{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-25T07:55:17.584049Z",
     "start_time": "2020-04-25T07:55:17.427369Z"
    }
   },
   "outputs": [],
   "source": [
    "\n",
    "import torch\n",
    "import torch.nn as nn\n",
    "import numpy as np\n",
    "from torch.nn.utils import clip_grad_norm_\n",
    "from torch.utils.data import DataLoader\n",
    "import os"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 语料"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "\n",
    "## 创建语料处理对象\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-23T10:16:04.533975Z",
     "start_time": "2020-04-23T10:16:04.525509Z"
    },
    "code_folding": []
   },
   "outputs": [],
   "source": [
    "# 从语料中创建词典\n",
    "class Dictionary:\n",
    "    def __init__(self):\n",
    "        self.word2idx = {}\n",
    "        self.idx2word = {}\n",
    "        self.idx = 0\n",
    "\n",
    "    def add_word(self, word):\n",
    "        if not word in self.word2idx:\n",
    "            self.word2idx[word] = self.idx\n",
    "            self.idx2word[self.idx] = word\n",
    "            self.idx += 1\n",
    "\n",
    "    def __len__(self):\n",
    "        return len(self.word2idx)\n",
    "\n",
    "\n",
    "# 语料处理\n",
    "class Corpus:\n",
    "    def __init__(self):\n",
    "        self.dictionary = Dictionary()\n",
    "\n",
    "    def get_data(self, path, batch_size=20):\n",
    "        # 从语料创建词典\n",
    "        with open(path, 'r') as f:\n",
    "            num_tokens = 0\n",
    "            for line in f:\n",
    "                words = line.split() + ['<eos>']\n",
    "                num_tokens += len(words)\n",
    "                for word in words:\n",
    "                    self.dictionary.add_word(word)\n",
    "\n",
    "        # 将语料向量化\n",
    "        vector = torch.LongTensor(num_tokens)\n",
    "        ind = 0\n",
    "        with open(path, 'r') as f:\n",
    "            for line in f:\n",
    "                words = line.split() + ['<eos>']\n",
    "                for word in words:\n",
    "                    vector[ind] = self.dictionary.word2idx[word]\n",
    "                    ind += 1\n",
    "        num_batches = vector.size(0) // batch_size\n",
    "        vector = vector[:num_batches * batch_size]\n",
    "        return vector.view(batch_size, -1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-23T09:35:38.340380Z",
     "start_time": "2020-04-23T09:35:38.334661Z"
    }
   },
   "source": [
    "## 创建输入数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-23T10:16:09.005269Z",
     "start_time": "2020-04-23T10:16:06.060730Z"
    }
   },
   "outputs": [],
   "source": [
    "corpus = Corpus()\n",
    "datasets = corpus.get_data('../datasets/train.txt', batch_size=20)\n",
    "\n",
    "\n",
    "# 词汇表的大小\n",
    "vocab_size = len(corpus.dictionary)\n",
    "\n",
    "# 数据批次\n",
    "num_batches = len(data_loader)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-23T10:16:09.016633Z",
     "start_time": "2020-04-23T10:16:09.014339Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "20"
      ]
     },
     "execution_count": 83,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(datasets)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-23T10:16:47.027752Z",
     "start_time": "2020-04-23T10:16:47.021384Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "93 --> that\n",
      "718 --> would\n",
      "590 --> so\n",
      "1569 --> load\n",
      "35 --> a\n",
      "4979 --> carrier\n",
      "95 --> up\n",
      "87 --> with\n",
      "507 --> debt\n",
      "93 --> that\n"
     ]
    }
   ],
   "source": [
    "sample = datasets[1, :10]\n",
    "sample\n",
    "for ind in sample.numpy():\n",
    "    print(f\"{ind} --> {corpus.dictionary.idx2word[ind]}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 创建模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-25T07:55:25.726162Z",
     "start_time": "2020-04-25T07:55:25.721223Z"
    }
   },
   "outputs": [],
   "source": [
    "# 参数\n",
    "embed_size = 128\n",
    "hidden_size = 1024\n",
    "num_layers = 1\n",
    "num_epochs = 5\n",
    "num_samples = 1000  # number of words to be sampled\n",
    "batch_size = 20\n",
    "seq_length = 30\n",
    "learning_rate = 0.002"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-25T07:55:26.141768Z",
     "start_time": "2020-04-25T07:55:26.129893Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "device(type='cuda')"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\n",
    "device"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-25T07:55:28.287664Z",
     "start_time": "2020-04-25T07:55:28.281225Z"
    }
   },
   "outputs": [],
   "source": [
    "# 定义模型\n",
    "class RNNLM(nn.Module):\n",
    "    def __init__(self, vocab_size, embed_size, hidden_size, num_layers):\n",
    "        super(RNNLM, self).__init__()\n",
    "        self.embed = nn.Embedding(vocab_size, embed_size)\n",
    "        self.lstm = nn.LSTM(embed_size,\n",
    "                            hidden_size,\n",
    "                            num_layers,\n",
    "                            batch_first=True)\n",
    "        self.linear = nn.Linear(hidden_size, vocab_size)\n",
    "\n",
    "    def forward(self, x, h):\n",
    "        x = self.embed(x)\n",
    "        out, (h, c) = self.lstm(x, h)\n",
    "        batch, seq, feature = out.shape\n",
    "        out = out.reshape(batch * seq, feature)\n",
    "        out = self.linear(out)\n",
    "        return out, (h, c)\n",
    "    \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-25T07:55:55.635422Z",
     "start_time": "2020-04-25T07:55:54.188219Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "RNNLM(\n",
       "  (embed): Embedding(1000, 128)\n",
       "  (lstm): LSTM(128, 1024, batch_first=True)\n",
       "  (linear): Linear(in_features=1024, out_features=1000, bias=True)\n",
       ")"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "vocab_size = 1000\n",
    "model = RNNLM(vocab_size, embed_size, hidden_size, num_layers).to(device)\n",
    "model"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-23T10:22:30.861660Z",
     "start_time": "2020-04-23T10:22:30.856733Z"
    }
   },
   "outputs": [],
   "source": [
    "criterion = nn.CrossEntropyLoss()\n",
    "optimizer = torch.optim.Adam(model.parameters(), lr=learning_rate)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-23T10:22:31.375605Z",
     "start_time": "2020-04-23T10:22:31.369141Z"
    }
   },
   "outputs": [],
   "source": [
    "def detach(states):\n",
    "    return [state.detach() for state in states]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-23T10:23:54.463750Z",
     "start_time": "2020-04-23T10:22:31.878094Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch [1/5], Step[0/46479], Loss: 9.2147, Perplexity: 10043.44\n",
      "Epoch [1/5], Step[100/46479], Loss: 5.9966, Perplexity: 402.08\n",
      "Epoch [1/5], Step[200/46479], Loss: 5.8979, Perplexity: 364.28\n",
      "Epoch [1/5], Step[300/46479], Loss: 5.7438, Perplexity: 312.26\n",
      "Epoch [1/5], Step[400/46479], Loss: 5.6847, Perplexity: 294.33\n",
      "Epoch [1/5], Step[500/46479], Loss: 5.1114, Perplexity: 165.90\n",
      "Epoch [1/5], Step[600/46479], Loss: 5.1789, Perplexity: 177.50\n",
      "Epoch [1/5], Step[700/46479], Loss: 5.3557, Perplexity: 211.82\n",
      "Epoch [1/5], Step[800/46479], Loss: 5.1976, Perplexity: 180.83\n",
      "Epoch [1/5], Step[900/46479], Loss: 5.0826, Perplexity: 161.19\n",
      "Epoch [1/5], Step[1000/46479], Loss: 5.0941, Perplexity: 163.06\n",
      "Epoch [1/5], Step[1100/46479], Loss: 5.2947, Perplexity: 199.27\n",
      "Epoch [1/5], Step[1200/46479], Loss: 5.1567, Perplexity: 173.60\n",
      "Epoch [1/5], Step[1300/46479], Loss: 5.0658, Perplexity: 158.50\n",
      "Epoch [1/5], Step[1400/46479], Loss: 4.8253, Perplexity: 124.62\n",
      "Epoch [1/5], Step[1500/46479], Loss: 5.1224, Perplexity: 167.74\n",
      "Epoch [2/5], Step[0/46479], Loss: 5.4779, Perplexity: 239.34\n",
      "Epoch [2/5], Step[100/46479], Loss: 4.5409, Perplexity: 93.77\n",
      "Epoch [2/5], Step[200/46479], Loss: 4.6778, Perplexity: 107.53\n",
      "Epoch [2/5], Step[300/46479], Loss: 4.6790, Perplexity: 107.66\n",
      "Epoch [2/5], Step[400/46479], Loss: 4.5697, Perplexity: 96.51\n",
      "Epoch [2/5], Step[500/46479], Loss: 4.1268, Perplexity: 61.98\n",
      "Epoch [2/5], Step[600/46479], Loss: 4.4219, Perplexity: 83.25\n",
      "Epoch [2/5], Step[700/46479], Loss: 4.4166, Perplexity: 82.82\n",
      "Epoch [2/5], Step[800/46479], Loss: 4.4389, Perplexity: 84.68\n",
      "Epoch [2/5], Step[900/46479], Loss: 4.1568, Perplexity: 63.86\n",
      "Epoch [2/5], Step[1000/46479], Loss: 4.2312, Perplexity: 68.80\n",
      "Epoch [2/5], Step[1100/46479], Loss: 4.4699, Perplexity: 87.35\n",
      "Epoch [2/5], Step[1200/46479], Loss: 4.4423, Perplexity: 84.97\n",
      "Epoch [2/5], Step[1300/46479], Loss: 4.2446, Perplexity: 69.73\n",
      "Epoch [2/5], Step[1400/46479], Loss: 3.9794, Perplexity: 53.49\n",
      "Epoch [2/5], Step[1500/46479], Loss: 4.3139, Perplexity: 74.73\n",
      "Epoch [3/5], Step[0/46479], Loss: 4.4998, Perplexity: 90.00\n",
      "Epoch [3/5], Step[100/46479], Loss: 3.8612, Perplexity: 47.52\n",
      "Epoch [3/5], Step[200/46479], Loss: 4.0692, Perplexity: 58.51\n",
      "Epoch [3/5], Step[300/46479], Loss: 3.9857, Perplexity: 53.82\n",
      "Epoch [3/5], Step[400/46479], Loss: 3.8518, Perplexity: 47.08\n",
      "Epoch [3/5], Step[500/46479], Loss: 3.3668, Perplexity: 28.98\n",
      "Epoch [3/5], Step[600/46479], Loss: 3.8500, Perplexity: 46.99\n",
      "Epoch [3/5], Step[700/46479], Loss: 3.6989, Perplexity: 40.40\n",
      "Epoch [3/5], Step[800/46479], Loss: 3.8375, Perplexity: 46.41\n",
      "Epoch [3/5], Step[900/46479], Loss: 3.4109, Perplexity: 30.29\n",
      "Epoch [3/5], Step[1000/46479], Loss: 3.5443, Perplexity: 34.62\n",
      "Epoch [3/5], Step[1100/46479], Loss: 3.7512, Perplexity: 42.57\n",
      "Epoch [3/5], Step[1200/46479], Loss: 3.7886, Perplexity: 44.20\n",
      "Epoch [3/5], Step[1300/46479], Loss: 3.4857, Perplexity: 32.64\n",
      "Epoch [3/5], Step[1400/46479], Loss: 3.2234, Perplexity: 25.11\n",
      "Epoch [3/5], Step[1500/46479], Loss: 3.6453, Perplexity: 38.29\n",
      "Epoch [4/5], Step[0/46479], Loss: 3.5984, Perplexity: 36.54\n",
      "Epoch [4/5], Step[100/46479], Loss: 3.2834, Perplexity: 26.67\n",
      "Epoch [4/5], Step[200/46479], Loss: 3.5302, Perplexity: 34.13\n",
      "Epoch [4/5], Step[300/46479], Loss: 3.3836, Perplexity: 29.48\n",
      "Epoch [4/5], Step[400/46479], Loss: 3.4173, Perplexity: 30.49\n",
      "Epoch [4/5], Step[500/46479], Loss: 2.8823, Perplexity: 17.85\n",
      "Epoch [4/5], Step[600/46479], Loss: 3.3794, Perplexity: 29.35\n",
      "Epoch [4/5], Step[700/46479], Loss: 3.1809, Perplexity: 24.07\n",
      "Epoch [4/5], Step[800/46479], Loss: 3.3337, Perplexity: 28.04\n",
      "Epoch [4/5], Step[900/46479], Loss: 2.9383, Perplexity: 18.88\n",
      "Epoch [4/5], Step[1000/46479], Loss: 3.0960, Perplexity: 22.11\n",
      "Epoch [4/5], Step[1100/46479], Loss: 3.2300, Perplexity: 25.28\n",
      "Epoch [4/5], Step[1200/46479], Loss: 3.2993, Perplexity: 27.09\n",
      "Epoch [4/5], Step[1300/46479], Loss: 2.9608, Perplexity: 19.31\n",
      "Epoch [4/5], Step[1400/46479], Loss: 2.7095, Perplexity: 15.02\n",
      "Epoch [4/5], Step[1500/46479], Loss: 3.1381, Perplexity: 23.06\n",
      "Epoch [5/5], Step[0/46479], Loss: 3.1071, Perplexity: 22.36\n",
      "Epoch [5/5], Step[100/46479], Loss: 2.9533, Perplexity: 19.17\n",
      "Epoch [5/5], Step[200/46479], Loss: 3.1606, Perplexity: 23.58\n",
      "Epoch [5/5], Step[300/46479], Loss: 3.1351, Perplexity: 22.99\n",
      "Epoch [5/5], Step[400/46479], Loss: 3.0956, Perplexity: 22.10\n",
      "Epoch [5/5], Step[500/46479], Loss: 2.5392, Perplexity: 12.67\n",
      "Epoch [5/5], Step[600/46479], Loss: 3.1024, Perplexity: 22.25\n",
      "Epoch [5/5], Step[700/46479], Loss: 2.8134, Perplexity: 16.67\n",
      "Epoch [5/5], Step[800/46479], Loss: 3.0166, Perplexity: 20.42\n",
      "Epoch [5/5], Step[900/46479], Loss: 2.6875, Perplexity: 14.69\n",
      "Epoch [5/5], Step[1000/46479], Loss: 2.8443, Perplexity: 17.19\n",
      "Epoch [5/5], Step[1100/46479], Loss: 2.8549, Perplexity: 17.37\n",
      "Epoch [5/5], Step[1200/46479], Loss: 2.9823, Perplexity: 19.73\n",
      "Epoch [5/5], Step[1300/46479], Loss: 2.6885, Perplexity: 14.71\n",
      "Epoch [5/5], Step[1400/46479], Loss: 2.4125, Perplexity: 11.16\n",
      "Epoch [5/5], Step[1500/46479], Loss: 2.8085, Perplexity: 16.58\n"
     ]
    }
   ],
   "source": [
    "for epoch in range(num_epochs):\n",
    "    states = [\n",
    "        torch.zeros(num_layers, batch_size, hidden_size).to(device),\n",
    "        torch.zeros(num_layers, batch_size, hidden_size).to(device)\n",
    "    ]\n",
    "    for i in range(0, datasets.size(1) - seq_length, seq_length):\n",
    "        inputs = datasets[:, i:i + seq_length].to(device)\n",
    "        targets = datasets[:, (i + 1):(i + 1 + seq_length)].to(device)\n",
    "\n",
    "        states = detach(states)\n",
    "        outputs, states = model(inputs, states)\n",
    "        loss = criterion(outputs, targets.reshape(-1))\n",
    "\n",
    "        optimizer.zero_grad()\n",
    "        loss.backward()\n",
    "        clip_grad_norm_(model.parameters(), 0.5)\n",
    "        optimizer.step()\n",
    "\n",
    "        step = (i + 1) // seq_length\n",
    "        if step % 100 == 0:\n",
    "            print(\n",
    "                'Epoch [{}/{}], Step[{}/{}], Loss: {:.4f}, Perplexity: {:5.2f}'\n",
    "                .format(epoch + 1, num_epochs, step, num_batches, loss.item(),\n",
    "                        np.exp(loss.item())))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 97,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-23T10:24:38.894724Z",
     "start_time": "2020-04-23T10:24:38.441000Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "produce \n",
      "gains \n",
      "enough \n",
      "for \n",
      "one-third \n",
      "the \n",
      "next \n",
      "buy-out \n",
      "purchased \n",
      "\n",
      "\n",
      "a \n",
      "spokesman \n",
      "for \n",
      "the \n",
      "<unk> \n",
      "the \n",
      "head \n",
      "of \n",
      "a \n",
      "new \n",
      "york \n",
      "financier \n",
      "ronald \n",
      "<unk> \n",
      "tv \n",
      "<unk> \n",
      "diseases \n",
      "a \n",
      "potential \n",
      "block \n",
      "corp. \n",
      "<unk> \n",
      "conn \n",
      "to \n",
      "become \n",
      "hurt \n",
      "<unk> \n",
      "knight \n",
      "co. \n",
      "which \n",
      "stood \n",
      "at \n",
      "ford \n",
      "motor \n",
      "united \n",
      "press \n",
      "over \n",
      "the \n",
      "<unk> \n",
      "islands \n",
      "\n",
      "\n",
      "picks \n",
      "how \n",
      "can \n",
      "be \n",
      "used \n",
      "in \n",
      "a \n",
      "company \n",
      "controlled \n",
      "by \n",
      "osha \n",
      "for \n",
      "the \n",
      "international \n",
      "and \n",
      "<unk> \n",
      "projects \n",
      "\n",
      "\n",
      "osha \n",
      "led \n",
      "to \n",
      "a \n",
      "bid \n",
      "by \n",
      "$ \n",
      "N \n",
      "million \n",
      "an \n",
      "equity \n",
      "loss \n",
      "incurred \n",
      "to \n",
      "about \n",
      "$ \n",
      "N \n",
      "million \n",
      "from \n",
      "<unk> \n",
      "assets \n",
      "a \n",
      "year \n",
      "earlier \n",
      "\n",
      "\n",
      "the \n",
      "company \n",
      "is \n",
      "once \n",
      "we \n",
      "see \n",
      "it \n",
      "works \n",
      "would \n",
      "be \n",
      "owned \n",
      "by \n",
      "workers \n",
      "and \n",
      "will \n",
      "start \n",
      "to \n",
      "workers \n",
      "who \n",
      "do \n",
      "n't \n",
      "belong \n",
      "on \n",
      "the \n",
      "sessions \n",
      "he \n",
      "said \n",
      "\n",
      "\n",
      "anheuser \n",
      "said \n",
      "the \n",
      "new \n",
      "structure \n",
      "would \n",
      "continue \n",
      "home \n",
      "the \n",
      "fed \n",
      "holds \n",
      "down \n",
      "at \n",
      "least \n",
      "for \n",
      "them \n",
      "<unk> \n",
      "if \n",
      "other \n",
      "tests \n",
      "had \n",
      "had \n",
      "to \n",
      "egg \n",
      "the \n",
      "changes \n",
      "\n",
      "\n",
      "goodson \n",
      "also \n",
      "said \n",
      "that \n",
      "soviet \n",
      "<unk> \n",
      "could \n",
      "n't \n",
      "press \n",
      "a \n",
      "bad \n",
      "trade \n",
      "\n",
      "\n",
      "we \n",
      "believe \n",
      "in \n",
      "east \n",
      "germany \n",
      "would \n",
      "argue \n",
      "that \n",
      "the \n",
      "contras \n",
      "is \n",
      "on \n",
      "the \n",
      "pemex \n",
      "struggle \n",
      "will \n",
      "provide \n",
      "free \n",
      "elections \n",
      "as \n",
      "well \n",
      "\n",
      "\n",
      "thousands \n",
      "of \n",
      "east \n",
      "germans \n",
      "fled \n",
      "in \n",
      "N \n",
      "in \n",
      "principle \n",
      "to \n",
      "complete \n",
      "a \n",
      "list \n",
      "of \n",
      "default \n",
      "a \n",
      "region \n",
      "that \n",
      "conference \n",
      "say \n",
      "they \n",
      "paid \n",
      "to \n",
      "despite \n",
      "subsidized \n",
      "guidelines \n",
      "in \n",
      "air-freight \n",
      "\n",
      "\n",
      "the \n",
      "west \n",
      "german \n",
      "<unk> \n",
      "mr. \n",
      "honecker \n",
      "reports \n",
      "association \n",
      "a \n",
      "florida \n",
      "role \n",
      "in \n",
      "late \n",
      "last \n",
      "month \n",
      "\n",
      "\n",
      "others \n",
      "suggest \n",
      "that \n",
      "control \n",
      "data \n",
      "had \n",
      "n't \n",
      "been \n",
      "invited \n",
      "out \n",
      "for \n",
      "three \n",
      "years \n",
      "at \n",
      "columbia \n",
      "\n",
      "\n",
      "he \n",
      "says \n",
      "he \n",
      "made \n",
      "ample \n",
      "our \n",
      "<unk> \n",
      "cut \n",
      "off \n",
      "night \n",
      "\n",
      "\n",
      "columbia \n",
      "announced \n",
      "about \n",
      "$ \n",
      "N \n",
      "million \n",
      "\n",
      "\n",
      "the \n",
      "three \n",
      "non-food \n",
      "operations \n",
      "were \n",
      "n't \n",
      "b.a.t \n",
      "which \n",
      "said \n",
      "it \n",
      "decided \n",
      "will \n",
      "prove \n",
      "to \n",
      "a \n",
      "final \n",
      "financing \n",
      "of \n",
      "N \n",
      "million \n",
      "<unk> \n",
      "the \n",
      "luxury \n",
      "auto \n",
      "maker \n",
      "'s \n",
      "home \n",
      "box \n",
      "securities \n",
      "\n",
      "\n",
      "the \n",
      "N \n",
      "N \n",
      "debentures \n",
      "maturing \n",
      "in \n",
      "april \n",
      "N \n",
      "from \n",
      "N \n",
      "have \n",
      "increased \n",
      "the \n",
      "total \n",
      "N \n",
      "million \n",
      "vehicles \n",
      "<unk> \n",
      "its \n",
      "assets \n",
      "in \n",
      "las \n",
      "vegas \n",
      "nev. \n",
      "exploration \n",
      "and \n",
      "production \n",
      "rates \n",
      "and \n",
      "that \n",
      "it \n",
      "expects \n",
      "to \n",
      "be \n",
      "back \n",
      "\n",
      "\n",
      "yesterday \n",
      "based \n",
      "in \n",
      "irvine \n",
      "calif. \n",
      "were \n",
      "$ \n",
      "N \n",
      "million \n",
      "to \n",
      "$ \n",
      "N \n",
      "million \n",
      "from \n",
      "N \n",
      "N \n",
      "this \n",
      "year \n",
      "as \n",
      "the \n",
      "front \n",
      "being \n",
      "<unk> \n",
      "<unk> \n",
      "last \n",
      "year \n",
      "\n",
      "\n",
      "last \n",
      "month \n",
      "totaled \n",
      "$ \n",
      "N \n",
      "billion \n",
      "in \n",
      "july \n",
      "\n",
      "\n",
      "the \n",
      "institute \n",
      "into \n",
      "the \n",
      "core \n",
      "difference \n",
      "of \n",
      "the \n",
      "experiment \n",
      "continues \n",
      "to \n",
      "be \n",
      "<unk> \n",
      "less \n",
      "negative \n",
      "than \n",
      "the \n",
      "first \n",
      "loss \n",
      "\n",
      "\n",
      "in \n",
      "the \n",
      "first \n",
      "half \n",
      "the \n",
      "company \n",
      "sold \n",
      "in \n",
      "heavy \n",
      "trading \n",
      "at \n",
      "<unk> \n",
      "headquarters \n",
      "at \n",
      "<unk> \n",
      "<unk> \n",
      "& \n",
      "<unk> \n",
      "<unk> \n",
      "pharmaceuticals \n",
      "co. \n",
      "by \n",
      "the \n",
      "university \n",
      "<unk> \n",
      "norton \n",
      "at \n",
      "mr. \n",
      "<unk> \n",
      "\n",
      "\n",
      "in \n",
      "july \n",
      "ford \n",
      "began \n",
      "importing \n",
      "negotiations \n",
      "in \n",
      "television \n",
      "two \n",
      "commodities \n",
      "pits \n",
      "the \n",
      "country \n",
      "'s \n",
      "latest \n",
      "ogilvy \n",
      "to \n",
      "manufacture \n",
      "ford \n",
      "and \n",
      "<unk> \n",
      "to \n",
      "honor \n",
      "\n",
      "\n",
      "in \n",
      "N \n",
      "other \n",
      "existing \n",
      "<unk> \n",
      "<unk> \n",
      "agreement \n",
      "said \n",
      "mr. \n",
      "kageyama \n",
      "N \n",
      "years \n",
      "old \n",
      "abruptly \n",
      "described \n",
      "recently \n",
      "in \n",
      "a \n",
      "memorandum \n",
      "contends \n",
      "that \n",
      "this \n",
      "will \n",
      "be \n",
      "an \n",
      "ally \n",
      "is \n",
      "likely \n",
      "to \n",
      "be \n",
      "as \n",
      "simple \n",
      "\n",
      "\n",
      "the \n",
      "company \n",
      "is \n",
      "first \n",
      "oil \n",
      "exhibition \n",
      "\n",
      "\n",
      "corporate \n",
      "earnings \n",
      "climbed \n",
      "N \n",
      "N \n",
      "to \n",
      "N \n",
      "N \n",
      "\n",
      "\n",
      "painewebber \n",
      "inc. \n",
      "said \n",
      "that \n",
      "investor \n",
      "carl \n",
      "icahn \n",
      "has \n",
      "n't \n",
      "a \n",
      "new \n",
      "information \n",
      "on \n",
      "tuesday \n",
      "and \n",
      "burlington \n",
      "'s \n",
      "paper \n",
      "\n",
      "\n",
      "for \n",
      "<unk> \n",
      "' \n",
      "audiences \n",
      "components \n",
      "back \n",
      "and \n",
      "attempted \n",
      "the \n",
      "gang \n",
      "in \n",
      "a \n",
      "way \n",
      "that \n",
      "would \n",
      "have \n",
      "fallen \n",
      "the \n",
      "fits \n",
      "of \n",
      "a \n",
      "new \n",
      "slate \n",
      "that \n",
      "should \n",
      "be \n",
      "oversubscribed \n",
      "\n",
      "\n",
      "mr. \n",
      "roman \n",
      "paid \n",
      "long-term \n",
      "rochester \n",
      "telephone \n",
      "co. \n",
      "advanced \n",
      "micro \n",
      "inc. \n",
      "of \n",
      "$ \n",
      "N \n",
      "million \n",
      "of \n",
      "convertible \n",
      "debentures \n",
      "debentures \n",
      "nov. \n",
      "N \n",
      "\n",
      "\n",
      "the \n",
      "fund \n",
      "'s \n",
      "N \n",
      "moves \n",
      "terms \n",
      "was \n",
      "affected \n",
      "by \n",
      "the \n",
      "stock \n",
      "divided \n",
      "and \n",
      "at \n",
      "par \n",
      "on \n",
      "oct. \n",
      "N \n",
      "in \n",
      "earlier \n",
      "and \n",
      "a \n",
      "large \n",
      "pool \n",
      "and \n",
      "the \n",
      "thrift \n",
      "look \n",
      "at \n",
      "a \n",
      "role \n",
      "of \n",
      "the \n",
      "number \n",
      "of \n",
      "earlier \n",
      "losses \n",
      "at \n",
      "<unk> \n",
      "said \n",
      "salomon \n",
      "bank \n",
      "\n",
      "\n",
      "outside \n",
      "the \n",
      "<unk> \n",
      "assets \n",
      "in \n",
      "newport \n",
      "'s \n",
      "existing \n",
      "problems \n",
      "which \n",
      "account \n",
      "to \n",
      "lower \n",
      "dutch \n",
      "metals \n",
      "international \n",
      "beverly \n",
      "hills \n",
      "calif. \n",
      "its \n",
      "retail \n",
      "facilities \n",
      "as \n",
      "well \n",
      "as \n",
      "the \n",
      "contract \n",
      "and \n",
      "buyers \n",
      "of \n",
      "<unk> \n",
      "problems \n",
      "in \n",
      "some \n",
      "new \n",
      "markets \n",
      "may \n",
      "be \n",
      "forced \n",
      "to \n",
      "be \n",
      "more \n",
      "than \n",
      "previously \n",
      "from \n",
      "its \n",
      "gold \n",
      "\n",
      "\n",
      "next \n",
      "year \n",
      "congress \n",
      "will \n",
      "continue \n",
      "to \n",
      "report \n",
      "substantially \n",
      "fall \n",
      "to \n",
      "stuck \n",
      "that \n",
      "will \n",
      "keep \n",
      "shoppers \n",
      "flying \n",
      "on \n",
      "all \n",
      "pemex \n",
      "maintenance \n",
      "\n",
      "\n",
      "gulf \n",
      "power \n",
      "james \n",
      "r. \n",
      "<unk> \n",
      "formerly \n",
      "management \n",
      "president \n",
      "and \n",
      "chief \n",
      "executive \n",
      "officer \n",
      "james \n",
      "e. \n",
      "trotter \n",
      "a \n",
      "consultant \n",
      "and \n",
      "<unk> \n",
      "e. \n",
      "<unk> \n",
      "vice \n",
      "president \n",
      "of \n",
      "the \n",
      "system \n",
      "\n",
      "\n",
      "james \n",
      "e. \n",
      "<unk> \n",
      "N \n",
      "vice \n",
      "president \n",
      "robert \n",
      "maxwell \n",
      "said \n",
      "he \n",
      "was \n",
      "successfully \n",
      "questioned \n",
      "to \n",
      "the \n",
      "international \n",
      "news \n",
      "network \n",
      "to \n",
      "make \n",
      "the \n",
      "active \n",
      "ban \n",
      "until \n",
      "one \n",
      "navy \n",
      "agreement \n",
      "\n",
      "\n",
      "as \n",
      "part \n",
      "of \n",
      "mr. \n",
      "honecker \n",
      "a \n",
      "<unk> \n",
      "<unk> \n",
      "<unk> \n",
      "<unk> \n",
      "terrorism \n",
      "charges \n",
      "of \n",
      "N \n",
      "executive \n",
      "at \n",
      "<unk> \n",
      "university \n",
      "as \n",
      "mr. \n",
      "thomson \n",
      "noted \n",
      "sand \n",
      "will \n",
      "<unk> \n",
      "the \n",
      "articles \n",
      "from \n",
      "<unk> \n",
      "new \n",
      "york \n",
      "u.s. \n",
      "attorney \n",
      "'s \n",
      "office \n",
      "in \n",
      "little \n",
      "rock \n",
      "ark \n",
      "\n",
      "\n",
      "it \n",
      "killed \n",
      "N \n",
      "that \n",
      "<unk> \n",
      "<unk> \n",
      "and \n",
      "an \n",
      "entire \n",
      "film \n",
      "which \n",
      "transfer \n",
      "to \n",
      "N \n",
      "members \n",
      "in \n",
      "washington \n",
      "research \n",
      "cotton \n",
      "mr. \n",
      "bush \n",
      "said \n",
      "\n",
      "\n",
      "depending \n",
      "on \n",
      "the \n",
      "key \n",
      "housing \n",
      "starts \n",
      "to \n",
      "the \n",
      "mess \n",
      "the \n",
      "west \n",
      "german \n",
      "paper \n",
      "and \n",
      "it \n",
      "further \n",
      "after \n",
      "a \n",
      "long \n",
      "overdue \n",
      "attempt \n",
      "to \n",
      "make \n",
      "matters \n",
      "of \n",
      "hurricane \n",
      "\n",
      "\n",
      "it \n",
      "was \n",
      "led \n",
      "by \n",
      "charlie \n",
      "bush \n",
      "with \n",
      "west \n",
      "germany \n",
      "\n",
      "\n",
      "but \n",
      "the \n",
      "breaks \n",
      "formally \n",
      "about \n",
      "N \n",
      "yards \n",
      "yesterday \n",
      "and \n",
      "may \n",
      "\n",
      "\n",
      "the \n",
      "president \n",
      "lacks \n",
      "the \n",
      "unrest \n",
      "of \n",
      "rights \n",
      "leadership \n",
      "interest \n",
      "to \n",
      "N \n",
      "N \n",
      "of \n",
      "its \n",
      "N \n",
      "revenue \n",
      "alternative \n",
      "april \n",
      "N \n",
      "\n",
      "\n",
      "we \n",
      "want \n",
      "to \n",
      "be \n",
      "purchased \n",
      "there \n",
      "or \n",
      "no \n",
      "consideration \n",
      "to \n",
      "change \n",
      "a \n",
      "policy \n",
      "immediately \n",
      "shows \n",
      "the \n",
      "cycle \n",
      "appears \n",
      "or \n",
      "safe \n",
      "\n",
      "\n",
      "entertainment \n",
      "shows \n",
      "can \n",
      "make \n",
      "only \n",
      "a \n",
      "lot \n",
      "of \n",
      "credit \n",
      "monitoring \n",
      "goods \n",
      "and \n",
      "location \n",
      "even \n",
      "with \n",
      "N \n",
      "in \n",
      "the \n",
      "first \n",
      "three \n",
      "years \n",
      "\n",
      "\n",
      "some \n",
      "military \n",
      "patients \n",
      "want \n",
      "the \n",
      "<unk> \n",
      "legal \n",
      "he \n",
      "had \n",
      "been \n",
      "increasingly \n",
      "showing \n",
      "signs \n",
      "of \n",
      "they \n",
      "see \n",
      "real \n",
      "estate \n",
      "and \n",
      "stabilized \n",
      "alone \n",
      "in \n",
      "the \n",
      "new \n",
      "york \n",
      "metropolitan \n",
      "national \n",
      "bank \n",
      "of \n",
      "new \n",
      "york \n",
      "london \n",
      "that \n",
      "there \n",
      "'s \n",
      "less \n",
      "likelihood \n",
      "\n",
      "\n",
      "thomas \n",
      "boyd \n",
      "a \n",
      "former \n",
      "pentagon \n",
      "vice \n",
      "chairman \n",
      "of \n",
      "the \n",
      "california \n",
      "department \n",
      "at \n",
      "massachusetts \n",
      "institute \n",
      "of \n",
      "the \n",
      "two \n",
      "<unk> \n",
      "workplace \n",
      "went \n",
      "in \n",
      "cincinnati \n",
      "and \n",
      "brooklyn \n",
      "chief \n",
      "executive \n",
      "of \n",
      "<unk> \n",
      "<unk> \n",
      "& \n",
      "co. \n",
      "in \n",
      "japan \n",
      "\n",
      "\n",
      "arrested \n",
      "events \n",
      "less \n",
      "'s \n",
      "average \n",
      "was \n",
      "down \n",
      "N \n",
      "at \n",
      "N \n",
      "and \n",
      "the \n",
      "maximum \n",
      "of \n",
      "N \n",
      "shares \n",
      "' \n",
      "<unk> \n",
      "to \n",
      "N \n",
      "\n",
      "\n",
      "<unk> \n",
      "surgical \n",
      "carriers \n",
      "orders \n",
      "with \n",
      "a \n",
      "new \n",
      "specialty \n",
      "price \n",
      "problems \n"
     ]
    }
   ],
   "source": [
    "# Test the model\n",
    "with torch.no_grad():\n",
    "# with open('sample.txt', 'w') as f:\n",
    "    # Set intial hidden ane cell states\n",
    "    state = (torch.zeros(num_layers, 1, hidden_size).to(device),\n",
    "             torch.zeros(num_layers, 1, hidden_size).to(device))\n",
    "\n",
    "    # Select one word id randomly\n",
    "    prob = torch.ones(vocab_size)\n",
    "    input = torch.multinomial(prob, num_samples=1).unsqueeze(1).to(device)\n",
    "\n",
    "    for i in range(num_samples):\n",
    "        # Forward propagate RNN \n",
    "        output, state = model(input, state)\n",
    "\n",
    "        # Sample a word id\n",
    "        prob = output.exp()\n",
    "        word_id = torch.multinomial(prob, num_samples=1).item()\n",
    "\n",
    "        # Fill input with sampled word id for the next time step\n",
    "        input.fill_(word_id)\n",
    "\n",
    "        # File write\n",
    "        word = corpus.dictionary.idx2word[word_id]\n",
    "        word = '\\n' if word == '<eos>' else word + ' '\n",
    "        print(word)\n",
    "#         f.write(word)\n",
    "\n",
    "#         if (i+1) % 100 == 0:\n",
    "#             print('Sampled [{}/{}] words and save to {}'.format(i+1, num_samples, 'sample.txt'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 数据预处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-27T06:52:36.333534Z",
     "start_time": "2020-04-27T06:52:36.328438Z"
    }
   },
   "outputs": [],
   "source": [
    "import os\n",
    "import json\n",
    "import re\n",
    "import random\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-27T07:05:07.263648Z",
     "start_time": "2020-04-27T07:05:07.251878Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "poet.song.173000.json\n",
      "poet.tang.12000.json\n",
      "<class 'list'> 1000\n",
      "{'author': '錢起', 'paragraphs': ['煙渚復煙渚，畫屏休畫屏。', '引愁天末去，數點暮山青。'], 'title': '江行無題一百首 三十六', 'id': '955b7180-969b-4698-a5ef-d2a5c96451d2'}\n"
     ]
    }
   ],
   "source": [
    "# 查看数据文件\n",
    "data_path = \"../../H/datasets/chinese_potery/\"\n",
    "\n",
    "# 随机选择宋词文件\n",
    "file_name = ''\n",
    "while not file_name.startswith('poet.tang'):\n",
    "    file_name = random.choice(os.listdir(data_path))\n",
    "    print(file_name)\n",
    "sample_path = data_path + file_name\n",
    "\n",
    "sample = json.loads(open(sample_path, 'r').read())\n",
    "print(type(sample), len(sample))  # 读取的文件形式为字典组成的列表\n",
    "print(random.choice(sample))  # 键 paragraphs 对应的值为目标数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 文本预处理"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "class Corpus:\n",
    "    def __init__(self, config):\n",
    "        self.config = config\n",
    "        self.data_path = config.data_path\n",
    "        self.category = config.category\n",
    "        self.author = config.author\n",
    "        self.constarin = config.constrain\n",
    "        \n",
    "        self.raw_data = self.parse_raw_data()\n",
    "        self.word2idx = {}\n",
    "        self.idx2word = {}\n",
    "\n",
    "        \n",
    "    ############ 获取文件中文本，并预处理 #########################################\n",
    "    def parse_raw_data(self):\n",
    "        data = []\n",
    "        for file in os.listdir(self.data_path):\n",
    "            if file.startswith(self.category):\n",
    "                data.extend(self.parse_file(file, self.author, self.constrain))\n",
    "        return data\n",
    "\n",
    "    def parse_file(self, file, author, constrain):\n",
    "        res = []\n",
    "        data = json.loads(open(file).read())\n",
    "        for poetry in data:\n",
    "            content = \" \"\n",
    "            if author is not None and poetry['author'] != author:\n",
    "                continue\n",
    "\n",
    "            para = poetry['paragraphs']  # 将诗歌行组成的列表组成完整的长串\n",
    "            for line in para:\n",
    "                content += line\n",
    "\n",
    "            content = self.parse_poetry(content)\n",
    "            if content != \" \" and len(content) > 1:\n",
    "                res.append(content)\n",
    "        return res\n",
    "\n",
    "    def parse_poetry(self, content):\n",
    "        # 去掉诗歌内容括号中的部分，即注释\n",
    "        # para = \"-181-村橋路不端，數里就迴湍。積壤連涇脉，高林上笋竿。早嘗甘蔗淡，生摘琵琶酸。（「琵琶」，嚴壽澄校《張祜詩集》云：疑「枇杷」之誤。）好是去塵俗，煙花長一欄。\"\n",
    "        result, number = re.subn(\"（.*）\", \"\", para)\n",
    "        result, number = re.subn(\"{.*}\", \"\", result)\n",
    "        result, number = re.subn(\"《.*》\", \"\", result)\n",
    "        result, number = re.subn(\"《.*》\", \"\", result)\n",
    "        result, number = re.subn(\"[\\]\\[]\", \"\", result)\n",
    "\n",
    "        # 去掉数字\n",
    "        r = \"\"\n",
    "        for s in result:\n",
    "            if s not in [\n",
    "                    '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-'\n",
    "            ]:\n",
    "                r += s\n",
    "        # 处理两个句号为1个句号\n",
    "        r, number = re.subn(\"。。\", \"。\", r)\n",
    "\n",
    "        # 返回预处理好的文本\n",
    "        return r\n",
    "    \n",
    "    ############ 文本向量化并处理成等长 #########################################\n",
    "    def vectorize(self):\n",
    "        data = self.raw_data\n",
    "        # 创建字典\n",
    "        chars = {c for line in data for c in line}\n",
    "        self.word2idx = {char: ix for ix, char in enumerate(chars)}\n",
    "        self.word2idx['<EOP>'] = len(self.word2idx)\n",
    "        self.word2idx['<START>'] = len(self.word2idx)\n",
    "        self.word2idx['</s>'] = len(self.word2idx)\n",
    "        self.idx2word = {idx: char for char, idx in self.word2idx.items()}\n",
    "\n",
    "        # 添加起始标志\n",
    "        for i in range(0, len(self.raw_data)):\n",
    "            data[i] = ['<START>'] + list(data[i]) + ['<EOP>']\n",
    "\n",
    "        # 文本数值化，并等长处理\n",
    "        data_id = [[self.word2idx[w] for w in line] for line in data]\n",
    "        pad_data = pad_sequences(data_id,\n",
    "                                 maxlen=config.poetry_maxlen,\n",
    "                                 padding='pre',\n",
    "                                 truncating='post',\n",
    "                                 value=len(char_to_ix) - 1)\n",
    "        np.savez_compressed(config.processed_data_path,\n",
    "                            data=pad_data,\n",
    "                            word2ix=char2ix,\n",
    "                            ix2word=ix_to_chars)\n",
    "        return pad_data\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-26T13:39:40.646356Z",
     "start_time": "2020-04-26T13:39:40.636871Z"
    }
   },
   "outputs": [],
   "source": [
    "def parse_raw_data(data_path, category, author, constrain):\n",
    "    def sentence_parse(para):\n",
    "        # 去掉括号中的部分\n",
    "        # para = \"-181-村橋路不端，數里就迴湍。積壤連涇脉，高林上笋竿。早嘗甘蔗淡，生摘琵琶酸。（「琵琶」，嚴壽澄校《張祜詩集》云：疑「枇杷」之誤。）好是去塵俗，煙花長一欄。\"\n",
    "        result, number = re.subn(\"（.*）\", \"\", para)\n",
    "        result, number = re.subn(\"{.*}\", \"\", result)\n",
    "        result, number = re.subn(\"《.*》\", \"\", result)\n",
    "        result, number = re.subn(\"《.*》\", \"\", result)\n",
    "        result, number = re.subn(\"[\\]\\[]\", \"\", result)\n",
    "\n",
    "        # 去掉数字\n",
    "        r = \"\"\n",
    "        for s in result:\n",
    "            if s not in [\n",
    "                    '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-'\n",
    "            ]:\n",
    "                r += s\n",
    "        # 处理两个句号为1个句号\n",
    "        r, number = re.subn(\"。。\", \"。\", r)\n",
    "\n",
    "        # 返回预处理好的文本\n",
    "        return r\n",
    "\n",
    "    def handle_json(file):\n",
    "        rst = []\n",
    "        data = json.loads(open(file).read())\n",
    "        for poetry in data:\n",
    "            pdata = \" \"\n",
    "\n",
    "            # 获取指定作者\n",
    "            if author is not None and poetry.get(\"author\") != author:\n",
    "                continue\n",
    "\n",
    "            p = poetry.get(\"paragraphs\")\n",
    "            flag = False\n",
    "            for s in p:\n",
    "                sp = re.split(\"[，！。]\", s)\n",
    "                for tr in sp:\n",
    "                    if constrain is not None and len(tr) != constrain and len(\n",
    "                            tr) != 0:\n",
    "                        flag = True\n",
    "                        break\n",
    "                    if flag:\n",
    "                        break\n",
    "            if flag:\n",
    "                continue\n",
    "            for sentence in poetry.get(\"paragraphs\"):\n",
    "                pdata += sentence\n",
    "            pdata = sentence_parse(pdata)\n",
    "            if pdata != \"\" and len(pdata) > 1:\n",
    "                rst.append(pdata)\n",
    "        return rst\n",
    "\n",
    "    data = []\n",
    "    for filename in os.listdir(data_path):\n",
    "        if filename.startswith(category):\n",
    "            data.extend(handle_json(data_path + filename))\n",
    "    return data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-26T13:39:42.718797Z",
     "start_time": "2020-04-26T13:39:41.559019Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[' 歌敲玉唾壺，醉擊珊瑚枝。石羊妙善街，甘露平泉碑。捫苔想豪傑，剔蘚看文詞。歸來北固山，水檻光參差。',\n",
       " ' 去年今夜江南別，鴛鴦翅冷飛蓬爇。今年今夜江北邊，鯉魚腸斷音書絕。男兒心事無了時，出門上馬不自知。',\n",
       " ' 勝景天然別，精神入畫圖。一山分四頂，三面瞰平湖。過夏僧無熱，凌冬草不枯。遊人來至此，願剃髪和鬚。',\n",
       " ' 臨塘古廟一神仙，繡幌花容色儼然。爲逐朝雲來此地，因隨暮雨不歸天。眉分初月湖中鑑，香散餘風竹上煙。借問邑人沈水事，已經秦漢幾千年。',\n",
       " ' 朱邸平臺隔禁闈，貴遊陳跡尚依稀。雲低雍畤祈年去，雨細長楊從獵歸。申白賓朋傳道義，應劉文彩寄音徽。承平舊物惟君盡，猶寫雕鞍伴六飛。',\n",
       " ' 破暗長明世代深，煙和香氣兩沈沈。不知初點何人在，秪見當年火至今。曉似紅蓮開沼面，夜如寒月鎮潭心。孤光自有龍神護，雀戲蛾飛不敢侵。',\n",
       " ' 艱難別離久，中外往還深。已改當時髪，空餘舊日心。',\n",
       " ' 累年無的信，每夜望邊城。袖掩千行淚，書封一尺金。',\n",
       " ' 自到西川住，惟君別有情。常逢對門遠，又隔一重城。',\n",
       " ' 巧畫蛾眉獨出羣，當時人道便承恩。經年不見君王面，落日黃昏空掩門。',\n",
       " ' 涇溪石險人競懼，終歲不聞傾覆人。却是平流無石處，時時聞說有沈淪。',\n",
       " ' 楚水悠悠浸楚亭，楚南天地兩無情。忍交孫武重泉下，不見時人說用兵。',\n",
       " ' 十二三年就試期，五湖煙月奈相違。何如買取胡孫弄，一笑君王便著緋。',\n",
       " ' 呂望當年展廟謨，直鉤釣國更誰如。若教生在西湖上，也是須供使宅魚。',\n",
       " ' 也知有意吹噓切，爭奈人間善惡分。但是粃糠細微物，等閑擡舉到青雲。',\n",
       " ' 牆下濃陰對此君，小山尖險玉爲羣。夜來解凍風雖急，不向寒城減一分。',\n",
       " ' 暖氣潛催次第春，梅花已謝杏花新。半開半落閑園裏，何異榮枯世上人。',\n",
       " ' 簷前飛雪扇前塵，千里移添上苑春。他日丁寧柿林院，莫宣恩澤與閑人。',\n",
       " ' 餘聲宛宛拂庭梅，通濟渠邊去又回。若使煬皇魂魄在，爲君應合過江來。',\n",
       " ' 黃土原邊狡兔肥，犬如流電馬如飛。灞陵老將無功業，猶憶當時夜獵歸。',\n",
       " ' 夏窗七葉連陰暗。賴家橋上潏河邊。細看月輪真有意，已知青桂近嫦娥。一箇禰衡容不得，思量黃祖謾英雄。張華謾出如丹語，不及劉侯一紙書。山雨霏微宿上亭，雨中因想雨淋鈴。老僧齋罷關門睡，不管波濤四面生。',\n",
       " ' 姓字看侵尺五天，芳菲占斷百花鮮。馬嵬好笑當時事，虛賺明皇幸蜀川。',\n",
       " ' 金谷園中花正繁，墜樓從道感深恩。齊奴却是來東市，不爲紅兒死更冤。',\n",
       " ' 陷却平陽爲小憐，周師百萬戰長川。更教乞與紅兒貌，舉國山川不值錢。',\n",
       " ' 一曲都緣張麗華，六宮齊唱後庭花。若教比竝紅兒貌，枉破當年國與家。',\n",
       " ' 樂營門外柳如陰，中有佳人畫閣深。若是五陵公子見，買時應不啻千金。',\n",
       " ' 青絲高綰石榴裙，腸斷當筵酒半醺。置向漢宮圖畫裏，入胡應不數昭君。',\n",
       " ' 斜凭欄杆醉態新，歛眸微盻不勝春。當時若遇東昏主，金葉蓮花是此人。',\n",
       " ' 匼匝千山與萬山，碧桃花下景長閑。神仙得似紅兒貌，應免劉郎憶世間。',\n",
       " ' 越山重疊越溪斜，西子休憐解浣紗。得似紅兒今日貌，肯教將去與夫差。',\n",
       " ' 詔下人間覓好花，月眉雲髻選人家。紅兒若向當時見，繫臂先封第一紗。',\n",
       " ' 鋒鏑縱橫不敢看，淚垂玉筯正汍瀾。應緣近似紅兒貌，始得深宮奉五官。',\n",
       " ' 金縷濃薰百和香，臉紅眉黛入時妝。當時便向喬家見，未敢將心在窈娘。',\n",
       " ' 通宵甲帳散香塵，漢帝精神禮百神。若見紅兒醉中態，也應休憶李夫人。',\n",
       " ' 拔得芙蓉出水新，魏家公子信才人。若教瞥見紅兒貌，不肯留情付洛神。',\n",
       " ' 芳姿不合竝常人，雲在遙天玉在塵。因事愛思荀奉倩，一生閑坐枉傷神。',\n",
       " ' 筆底如風思湧泉，賦中休謾說嬋娟。紅兒若在東家住，不得登牆爾許年。',\n",
       " ' 一抹濃紅傍臉斜，妝成不語獨攀花。當時若是逢韓壽，未必埋蹤在賈家。',\n",
       " ' 樹褭西風日半沈，地無人跡轉傷心。阿嬌得似紅兒貌，不費長門買賦金。',\n",
       " ' 五雲高捧紫金堂，花下投壺侍玉皇。從到世人都不識，也應知有杜蘭香。',\n",
       " ' 戲水源頭指舊蹤，當時一笑也難逢。紅兒若爲迴桃臉，豈比連催舉五烽。',\n",
       " ' 虢國夫人照夜璣，若爲求得與紅兒。醉和香態濃春睡，一樹繁花偃繡幃。',\n",
       " ' 知有持盈玉葉冠，剪雲裁月照人寒。若使紅兒風帽戴，直使瑤池會上看。',\n",
       " ' 明媚何曾讓玉環，破瓜年幾百花顏。若教貌向南朝見，定却梅妝似等閑。',\n",
       " ' 世事悠悠未足稱，肯將閑事更爭能。自從命向紅兒去，不欲留心在裂繒。',\n",
       " ' 自隱新從夢裏來，嶺雲微步下陽臺。含情一向春風笑，羞殺凡花盡不開。',\n",
       " ' 捨却青娥換玉鞍，古來公子苦無端。莫言一匹追風馬，天驥牽來也不看。',\n",
       " ' 檻外花低瑞露濃，夢魂驚覺暈春容。憑君細看紅兒貌，最稱嚴妝待曉鐘。',\n",
       " ' 薄羅輕剪越溪紋，鵶翅低垂兩鬢分。料得相如偷見面，不應琴裏挑文君。',\n",
       " ' 南國東隣各一時，後來惟有杜紅兒。若教楚國宮人見，羞把腰身竝柳枝。',\n",
       " ' 照耀金釵簇膩鬟，見時直向畫屏間。黃姑阿母能判剖，十斛明珠也是閑。',\n",
       " ' 輕小休誇似燕身，生來占斷紫宮春。漢皇若遇紅兒貌，掌上無因著別人。',\n",
       " ' 鸚鵡娥如裛露紅，鏡前眉樣自深宮。稍教得似紅兒貌，不嫁南朝沈侍中。',\n",
       " ' 擬將心地學安禪，爭奈紅兒笑靨圓。何物把來堪比竝，野塘初綻一枝蓮。',\n",
       " ' 浸草漂花遶檻香，最憐穿度樂營牆。殷勤留滯緣何事，曾照紅兒一面妝。',\n",
       " ' 雕陰舊俗騁嬋娟，有箇紅兒賽洛川。常笑世人語虛誕，今朝自見火中蓮。',\n",
       " ' 渡口諸儂樂未休，竟陵西望路悠悠。石城有箇紅兒貌，兩槳無因迎莫愁。',\n",
       " ' 誰向深山識大仙，勸人山上引春泉。定知不及紅兒貌，枉却工夫溉玉田。',\n",
       " ' 傾國傾城總絕倫，紅兒花下認真身。十年東北看燕趙，眼冷何曾見一人。',\n",
       " ' 今時自是不諳知，前代由來豈見遺。一笑陽城人便惑，何堪教見杜紅兒。',\n",
       " ' 京口喧喧百萬人，競傳河鼓謝星津。柰花似雪簪雲髻，今日夭容是後身。',\n",
       " ' 青史書時未是真，可能纖手却強秦。再三爲謝齊皇后，要解連環別與人。',\n",
       " ' 繡帳鴛鴦對刺紋，博山微暖麝微曛。詩成若有紅兒貌，悔道當時月墜雲。',\n",
       " ' 薄粉輕朱取次施，大都端正亦相宜。只如花下紅兒態，不籍城中半額眉。',\n",
       " ' 妝成渾欲認前朝，金鳳雙釵逐步搖。未必慕容宮裏伴，舞風歌月勝纖腰。',\n",
       " ' 琥珀釵成恩正深，玉兒妖惑蕩君心。莫教回首看妝面，始覺曾虛擲萬金。',\n",
       " ' 自有閑花一面春，臉檀眉黛一時新。殷勤爲報梁家婦，休把啼妝賺後人。',\n",
       " ' 輕梳小髻號慵來，巧中君心不用媒。可得紅兒拋醉眼，漢皇恩澤一時迴。',\n",
       " ' 千里長江旦暮潮，吳都風俗尚纖腰。周郎若見紅兒貌，料得無心念小喬。',\n",
       " ' 月落潛奔暗解攜，本心誰道獨單棲。還緣交甫非良偶，不肯終身作羿妻。',\n",
       " ' 漢皇曾識許飛瓊，寫向人間作畫屏。昨日紅兒花下見，大都相似更娉婷。',\n",
       " ' 魏帝休誇薛夜來，霧綃雲縠稱身裁。紅兒秀發君知否，倚檻繁花帶露開。',\n",
       " ' 曉月雕梁燕語頻，見花難可比他人。年年媚景歸何處，長作紅兒面上春。',\n",
       " ' 逗玉濺盆冬殿開，邀恩先賜夜明苔。紅兒若是三千數，多少芳心似死灰。',\n",
       " ' 畫簾垂地紫金牀，暗引羊車駐七香。若見紅兒此中住，不勞鹽篠灑宮廊。',\n",
       " ' 蘇小空勻一面妝，便留名字在錢塘。藏鴉門外諸年少，不識紅兒未是狂。',\n",
       " ' 一首長歌萬恨來，惹愁漂泊水難迴。崔徽有底多頭面，費得微之爾許才。',\n",
       " ' 昔年黃閣識奇章，愛說真珠似窈娘。若見紅兒深夜態，便應休說繡衣裳。',\n",
       " ' 鳳折鶯離恨轉深，此身難負百年心。紅兒若向隋朝見，破鏡無因更重尋。',\n",
       " ' 行綰穠雲立暗軒，我來猶愛不成冤。當時若見紅兒貌，未必邢相有此言。',\n",
       " ' 總似紅兒媚態新，莫論千度笑爭春。任伊孫武心如鐵，不辦軍前殺此人。',\n",
       " ' 暖塘爭赴盪舟期，行唱菱歌著豔詞。爲問東山謝丞相，可能諸妓勝紅兒。',\n",
       " ' 吳興皇后欲辭家，澤國重臺展曙華。今日紅兒貌傾國，恐須真宰別開花。',\n",
       " ' 陌上行人歌黍離，三千門客欲何之。若教麤及紅兒貌，爭取樓前斬愛姬。',\n",
       " ' 休話如臯一笑時，金𩩉中臆錦離披。陋容枉把雕弓射，射盡春禽未展眉。',\n",
       " ' 長恨西風送早秋，低眉深恨嫁牽牛。若同人世長相對，爭作夫妻得到頭。',\n",
       " ' 謝娘休漫逞風姿，未必娉婷勝柳枝。聞道只因嘲落絮，何曾得似杜紅兒。',\n",
       " ' 總傳桃葉渡江時，只爲王家一首詩。今日紅兒自堪賦，不須重唱舊來詞。',\n",
       " ' 巫山洛浦本無情，總爲佳人便得名。今日雕陰有神豔，後來公子莫相輕。',\n",
       " ' 幾拋雲髻恨金墉，淚洗花顏百戰中。應有紅兒些子貌，却言皇后長深宮。',\n",
       " ' 倚檻還應有所思，半開東閣見嬌姿。可中得似紅兒貌，若遇韓朋好殺伊。',\n",
       " ' 曉向妝臺與畫眉，鏡中長欲助嬌姿。若教得似紅兒貌，走馬章臺任道遲。',\n",
       " ' 練得霜華助翠鈿，相期朝謁玉皇前。依稀有似紅兒貌，方得吹簫引上天。',\n",
       " ' 重門深掩幾枝花，未勝紅兒莫大誇。王相不能探物理，可能虛上短轅車。',\n",
       " ' 前代休憐事可奇，後來還出有光輝。爭知晝臥紗窗裏，不見神人覆玉衣。',\n",
       " ' 化羽嘗聞赴九天，只疑塵世是虛傳。自從一見紅兒貌，始信人間有謫仙。',\n",
       " ' 從道長陵小市東，巧將花貌占春風。紅兒若是同時見，未必伊先入紫宮。',\n",
       " ' 人間難免是深情，命斷紅兒向此生。不似前時李丞相，枉拋才力爲鶯鶯。',\n",
       " ' 鳳舞香飄繡幕風，暖穿馳道百花中。還緣有似紅兒貌，始道迎將入漢宮。',\n",
       " ' 休道將軍出世才，盡驅諸妓下歌臺。都緣沒箇紅兒貌，致使輕教後閣開。',\n",
       " ' 馮媛須知住漢宮，將身只是解當熊。不聞有貌傾人國，爭得今朝更似紅。',\n",
       " ' 能將一笑使人迷，花豔何須上大堤。疎屬便同巫峽路，洛川真是武陵溪。',\n",
       " ' 辭輦當時意可知，寵深還恐寵先衰。若教得似紅兒貌，占却君恩自不疑。',\n",
       " ' 三吳時俗重風光，未見紅兒一面妝。好寫妖嬈與教看，便應休更話真娘。',\n",
       " ' 波平楚澤浸星辰，臺上君王宴早春。畢竟章華會中客，冠纓虛絕爲何人。',\n",
       " ' 紅兒不向漢宮生，便使雙成謾得名。疑是麻姑惱塵世，暫教微步下層城。',\n",
       " ' 天碧輕紗只六銖，宛如含露透肌膚。便教漢曲爭明媚，應沒心情更弄珠。',\n",
       " ' 共嗟含恨向衡陽，方寸花牋寄沈郎。不似紅兒些子貌，當時爭得少年狂。',\n",
       " ' 淺色桃花亞短牆，不因風送也聞香。凝情盡日君知否，還似紅兒淡薄妝。',\n",
       " ' 火色櫻桃摘得初，仙宮只有世間無。凝情盡日君知否，真似紅兒口上朱。',\n",
       " ' 宿雨初晴春日長，入簾花氣靜難忘。凝情盡日君知否，真似紅兒舞袖香。',\n",
       " ' 初月纖纖映碧池，池波不動獨看時。凝情盡日君知否，真似紅兒罷舞眉。',\n",
       " ' 濃豔濃香雪壓枝，褭煙和露曉風吹。紅兒被掩妝成後，含笑無人獨立時。',\n",
       " ' 樓上嬌歌褭夜霜，近來休數踏歌娘。紅兒謾唱伊州遍，認取輕敲玉韻長。',\n",
       " ' 金粟妝成扼臂環，舞腰輕薄瑞雲間。紅兒生在開元末，羞殺新豐謝阿蠻。',\n",
       " ' 君看紅兒學醉妝，誇裁宮襭砑裙長。誰能更把閑心力，比竝當時武媚娘。',\n",
       " ' 梔子同心裛露垂，折來深恐沒人知。花前醉客頻相問，不贈紅兒贈阿誰。',\n",
       " ' 雲間翡翠一雙飛，水上鴛鴦不暫離。寫向人間百般態，與君題作比紅詩。',\n",
       " ' 舊恨長懷不語中，幾回偷泣向春風。還緣不及紅兒貌，却得生教入楚宮。',\n",
       " ' 一舸春深指鄂君，好風從度水成紋。越人若見紅兒貌，繡被應羞徹夜薰。',\n",
       " ' 花落塵中玉墮泥，香魂應上窈娘堤。欲知此恨無窮處，長倩城烏夜夜啼。',\n",
       " ' 窗前遠岫懸生碧，簾外殘霞挂熟紅。',\n",
       " ' 星沈萬古痕，孤絕勢無鄰。地窄少留竹，空多剩占雲。釣篷和雨看，樵斧帶霜聞。莫惜尋常到，清風不負人。',\n",
       " ' 小閣愜幽尋，周遭萬竹森。誰知一沼內，亦有五湖心。釣直魚應笑，身閑樂自深。晚來春醉熟，香餌任浮沈。',\n",
       " ' 世間泉石本無價，那更天然落景中。漢佩琮琤寒溜雨，秦簫縹緲夜敲風。一方清氣羣陰伏，半局閑棋萬慮空。借問主人能住久，後來好事有誰同。',\n",
       " ' 堂開凍石千年翠，藝講秋膠百步威。揖讓未能忘典禮，英雄孰不慣戎衣。風波險似金機駭，日月忙如雪羽飛。莫怪尊前頻浩歎，男兒志願與時違。',\n",
       " ' 突險呀空龍虎蹲，由來英氣蓄寒根。蒼苔點染雲生靨，老雨淋漓鐵漬痕。松韻遠趨疑認祖，山陰輕覆似憐孫。孤巖恰恰容幽搆，可愛江南釋子園。',\n",
       " ' 流杯處處稱佳致，何似斯亭出自然。山溜穿雲來幾里，石盤和蘚鑿何年。聲交鳴玉歌沈板，色幌寒金酒滿船。莫怪坐中難得醉，醒人心骨有潺湲。',\n",
       " ' 東望青天周與秦，杏花榆葉故園春。野寺一傾寒食酒，晚來風景重愁人。',\n",
       " ' 駐旌元師遺風在，擊缶高人逸興酣。水轉巴文清溜急，山連蒙岫翠光涵。',\n",
       " ' 姓氏司空貴，官班御史卑。老夫如且在，不用歎屯奇。',\n",
       " ' 到來難遣去難留，著骨黏心萬事休。潘岳愁絲生鬢裏，婕妤悲色上眉頭。長途詩盡空騎馬，遠雁聲初獨倚樓。更有相思不相見，酒醒燈背月如鉤。',\n",
       " ' 本是安期燒藥處，今來改作坐禪宮。數僧梵響滿樓月，深谷猨聲半夜風。金簡事移松閣逈，綵雲影散閬山空。我來不見修真客，却得真如問遠公。',\n",
       " ' 未識都君面，頻輸復分錢。苦心事筆硯，得志助花鈿。徒步求秋賦，持杯給暮饘。力微多謝病，非不奉同年。',\n",
       " ' 曉啼珠露渾無力，繡簇羅襦不著行。若綴壽陽公主額，六宮爭肯學梅妝。',\n",
       " ' 解凍風來末上青，解垂羅袖拜卿卿。無端褭娜臨官路，舞送行人過一生。',\n",
       " ' 吳王宮裏色偏深，一簇纖條萬縷金。不憤錢塘蘇小小，引郎松下結同心。',\n",
       " ' 橋北橋南千萬條，恨伊張緒不相饒。金羈白馬臨風望，認得羊家靜婉腰。',\n",
       " ' 狂雪隨風撲馬飛，惹煙無力被春欺。莫交移入靈和殿，宮女三千又妬伊。',\n",
       " ' 褭翠籠煙拂暖波，舞裙新染麴塵羅。章華臺畔隋堤上，傍得春風爾許多。',\n",
       " ' 春來無處不閑行，楚潤相看別有情。好是五更殘酒醒，時時聞喚狀頭聲。',\n",
       " ' 銅梁千里曙雲開，仙籙新從紫府來。天上已張新羽翼，世間無復舊塵埃。嘉禎果中君平卜，賀喜須斟卓氏杯。應笑戎藩刀筆吏，至今泥滓曝魚鰓。',\n",
       " ' 曾隨風水化凡鱗，安上門前一字新。聞道蜀江風景好，不知何似杏園春。',\n",
       " ' 一一玄微縹緲成，盡吟方便爽神情。宣宗謫去爲閑事，韓愈知來已振名。海底也應搜得淨，月輪常被翫教傾。如何未隔四十載，不遇論量向此生。',\n",
       " ' 曾游方外見麻姑，說道君山此本無。云是崑崙山頂石，海風吹落洞庭湖。',\n",
       " ' 九重丹詔下塵埃，深鎖文闈罷選才。桂樹放教遮月長，杏園終待隔年開。自從玉帳論兵後，不許金門諫獵來。今日灞陵橋上過，路人應笑臘前迴。',\n",
       " ' 入門如洞府，花木與時稀。夜坐山當戶，秋吟葉滿衣。犬隨童子出，鳥避俗人飛。至藥應將熟，年年火氣微。',\n",
       " ' 及到怡情處，暫忘登陟勞。青山看不厭，明月坐來高。犬爲孤村吠，猨因冷木號。微吟還獨酌，多興憶同袍。',\n",
       " ' 蒼島孤生白浪中，倚天高塔勢翻空。煙凝遠岫列寒翠，霜染疎林墮碎紅。汀沼或栖彭澤雁，樓臺深貯洞庭風。六時金磬落何處，偏傍蘆葦驚釣翁。',\n",
       " ' 枯木傍溪崖，由來歲月賒。有根盤水石，無葉接煙霞。二月苔爲色，三冬雪作花。不因星使至，誰識是靈槎。',\n",
       " ' 河清海晏少波濤，幾載垂鉤不得鰲。空向人間修諫草，又來江上詠離騷。笳吹古堞邊聲遠，嶽倚晴空楚色高。何事明廷有徐庶，總教三徑臥蓬蒿。',\n",
       " ' 一葉飄然任浪吹，雨蓑煙笠肯忘機。只貪濁水張羅衆，却笑清流把釣稀。葦岸夜依明月宿，柴門晴櫂白雲歸。到頭得喪終須達，誰道漁樵有是非。',\n",
       " ' 陶公爲政卓潘齊，入縣看花柳滿堤。百里江山聊展驥，九臯雲月怪驅雞。高樓野色迎襟袖，比屋歌聲遠鼓鼙。只恐攀轅留不住，明時霄漢有丹梯。',\n",
       " ' 由來箕踞任天真，別有詩名出世塵。不愛春宮分桂樹，欲教天子枉蒲輪。城頭鼙鼓三聲曉，島外湖山一簇春。獨向若耶溪上住，誰知不是釣鰲人。',\n",
       " ' 蜀人猶說種難成，何事江東見接生。席上若微桃李伴，花中堪作牡丹兄。高軒日午爭濃豔，小徑風移旋落英。一種呈妍今得地，劒峯梨嶺謾縱橫。',\n",
       " ' 故園橋上絕埃塵，此日凭欄興自新。雲影晚將仙掌曙，水光迷得武陵春。薜蘿煙裏高低路，楊柳風前去住人。莫怪馬卿題姓字，終朝雲雨化龍津。',\n",
       " ' 高情度日非無事，自是高情不覺喧。海氣暗蒸蓮葉沼，山光晴逗葦花村。吟時勝概題詩板，靜處繁華付酒尊。閑伴白雲收桂子，每尋流水斸桐孫。猶憑律呂傳心曲，豈慮星霜到鬢根。多少清風歸此地，十年虛打五侯門。',\n",
       " ' 得地自成藂，那因種植功。有花皆吐雪，無韻不含風。倒影翹沙鳥，幽根立水蟲。蕭蕭寒雨夜，江漢思無窮。',\n",
       " ' 漠漠煙花處處通，游人南北思無窮。林間鳥奏笙簧月，野外花含錦繡風。鸑抱雲霞朝鳳闕，魚翻波浪化龍宮。此時誰羨神仙客，車馬悠揚九陌中。',\n",
       " ' 觸目皆因長養功，浮生何處問窮通？柳長北闕絲千縷，雲簇南山火萬籠。大野煙塵飄赫日，高樓簾幕逗薰風。身心已在喧闐處，惟羨滄浪把釣翁。',\n",
       " ' 宋玉高吟思萬重，澄澄寰宇振金風。雲閑日月浮虛白，木落山川疊碎紅。寥泬鴈多宮漏永，河渠煙歛塞天空。侯門處處槐花□，獻賦何時遇至公。',\n",
       " ' 寂寂棲心向杳冥，苦吟寒律句偏清。雲凝止水魚龍蟄，雪點遙峰草木榮。迥夜爐飜埃燼色，天河冰輾轆轤聲。歸飛未得東風力，魂斷三山九萬程。',\n",
       " ' 浩渺注橫流，千潭合萬湫。半洪侵楚翼，一汊屬吳頭。動軸當新霽，漫空正仲秋。勢翻荆口迮，聲擁岳陽浮。遠脈滋衡岳，微涼散橘州。星辰連影動，嵐翠逐隅收。漸落分行鴈，旋添趁伴舟。昇騰人莫測，安穩路何憂。氣與塵中別，言堪象外搜。此身如麤了，來把一竿休。',\n",
       " ' 塵生宮闕霧濛濛，萬騎龍飛幸蜀中。在野傅巖君不夢，乘軒衛懿鶴何功。雖知四海同盟久，未合中原武備空。星落夜原妖氣滿，漢家麟閣待英雄。',\n",
       " ' 梁園皓色月如珪，清景傷時一慘悽。未見山前歸牧馬，猶聞江上帶征鞞。鯤爲魚隊潛鱗困，鶴處雞羣病翅低。正是四郊多壘日，波濤早晚靜鯨鯢。',\n",
       " ' 白日三清此上時，觀開山下彩雲飛。仙壇丹竈靈猶在，鶴駕清朝去不歸。晉末幾遷陵谷改，塵中空換子孫非。松花落盡無消息，半夜疎鐘徹翠微。',\n",
       " ' 短行軸了付三銓，休把新銜惱必先。今日便稱前進士，好留春色與明年。',\n",
       " ' 村前村後樹，寓賞有餘情。青麥路初斷，紫花田未耕。雉聲聞不到，山勢望猶橫。寂寞春風裏，吟酣信馬行。',\n",
       " ' 團雪上晴梢，紅明映碧寥。店香風起夜，村白雨休朝。靜落猶和蒂，繁開正蔽條。澹然閑賞久，無以破妖嬈。',\n",
       " ' 村南微雨新，平綠淨無塵。散睡桑條暖，閑鳴屋脊春。遠聞和曉夢，相應在諸鄰。行樂花時節，追飛見亦頻。',\n",
       " ' 十口溝隍待一身，半年千里絕音塵。鬢毛如雪心如死，猶作長安下第人。',\n",
       " ' 爲報顏公識我麽，我心唯只與天和。眼前俗物關情少，醉後青山入意多。田子莫嫌彈鋏恨，甯生休唱飯牛歌。聖朝若爲蒼生計，也合公車到薜蘿。',\n",
       " ' 南北浮萍跡，年華又暗催。殘燈和臘盡，曉角帶春來。鬢欲漸侵雪，心仍未肯灰。金門舊知己，誰爲脫塵埃。',\n",
       " ' 天上何勞萬古春，君前誰是百年人。魂銷尚媿金爐燼，思起猶慚玉輦塵。煙翠薄情攀不得，星茫浮豔採無因。可憐明鏡來相向，何似恩光朝夕新。',\n",
       " ' 雲木送秋何草草，風波凝冷太星星。銀鞍公子魂俱斷，玉弩將軍涕自零。茅洞白龍和雨看，荆溪黃鵠帶霜聽。人間不見清涼事，猶向溪翁乞畫屏。',\n",
       " ' 濁河從北下，清洛向東流。清濁皆如此，何人不白頭。',\n",
       " ' 疊浪與雲急，翠蘭和意香。風流化爲雨，日暮下巫陽。',\n",
       " ' 金閣倚雲開，朱軒犯雪來。三冬辛苦樣，天意似難栽。',\n",
       " ' 一醉六十日，一裘三十年。年華經幾日，日日掉征鞭。',\n",
       " ' 平野有千里，居人無一家。甲兵年正少，日久戍天涯。',\n",
       " ' 天地太蕭索，山川何渺茫。不堪星斗柄，猶把歲寒量。',\n",
       " ' 三年離水石，一旦隱樵漁。爲問青雲上，何人識卷舒。',\n",
       " ' 野水千年在，閑花一夕空。近來浮世狹，何似釣船中。',\n",
       " ' 風雨去愁晚，關河歸思涼。西遊無紫氣，一夕九回腸。',\n",
       " ' 紫府歸期斷，芳洲別思迢。黃金作人世，只被歲寒消。',\n",
       " ' 曾和秋雨驅愁入，却向春風領恨回。深謝灞陵隄畔柳，與人頭上拂塵埃。',\n",
       " ' 何事金輿不再遊，翠鬟丹臉豈勝愁。重門深鎖禁鐘後，月滿驪山宮樹秋。',\n",
       " ' 風含遠思翛翛晚，日照高情的的秋。何事滿江惆悵水，年年無語向東流。',\n",
       " ' 澤國路岐當面苦，江城砧杵入心寒。不知白髮誰醫得，爲問無情歲月看。',\n",
       " ' 因將歲月離三島，閑貯風煙在一壺。爲問金烏頭白後，人間流水却回無。',\n",
       " ' 吳甸落花春漫漫，吳宮芳樹晚沈沈。王孫不耐如絲雨，罥斷春風一寸心。',\n",
       " ' 風散古陂驚宿鴈，月臨荒戍起啼鴉。不堪吟斷無人見，時復寒燈落一花。',\n",
       " ' 偶爲芳草無情客，況是青山有事身。一夕瓜洲渡頭宿，天風吹盡廣陵塵。',\n",
       " ' 曾伴浮雲歸晚翠，猶陪落日汎秋聲。世間無限丹青手，一片傷心畫不成。',\n",
       " ' 虞泉冬恨由來短，楊葉春期分外長。惆悵浮生不知處，明朝依舊出滄浪。',\n",
       " ' 天上夢魂何杳杳，日宮消息太沈沈。君恩不似黃金井，一處團圓萬丈深。',\n",
       " ' 天上鳳皇休寄夢，人間鸚鵡舊堪悲。平生心緒無人識，一隻金梭萬丈絲。',\n",
       " ' 馬嘶九陌年年苦，人語千門日日新。唯有終南寂無事，寒光不入帝鄉塵。',\n",
       " ' 天柱幾條搘白日，天門幾扇鎖明時。陽春發處無根蔕，憑仗東風分外吹。',\n",
       " ' 明月斷魂清靄靄，平蕪歸思綠迢迢。人生莫遣頭如雪，縱得春風亦不消。',\n",
       " ' 陽羨溪聲冷駭人，洞庭山翠晚凝神。天將金玉爲風露，曾爲高秋幾度貧。',\n",
       " ' 一條歸夢朱弦直，一片離心白羽輕。明日灞陵新霽後，馬頭煙樹綠相迎。',\n",
       " ' 丁當玉佩三更雨，平帖金閨一覺雲。明日薄情何處去，風流春水不知君。',\n",
       " ' 霞衣重疊紅蟬暖，雲髻葱籠紫鳳寒。天上少年分散後，一條煙水若爲看。',\n",
       " ' 雲鴻宿處江村冷，獨狖啼時海國陰。不會殘燈無一事，覺來猶有向隅心。',\n",
       " ' 一葉落時空下淚，三春歸盡復何情。無人共得東風語，半日尊前計不成。',\n",
       " ' 天上碧桃和露種，日邊紅杏倚雲栽。芙蓉生在秋江上，不向東風怨未開。',\n",
       " ' 君恩秋後葉，日日向人疎。',\n",
       " ' 誰家朱閣道邊開，竹拂欄干滿壁苔。野水不知何處去，遊人却是等閑來。南山氣聳分紅樹，北闕風高隔紫苔。可惜登臨好光景，五門須聽鼓聲迴。',\n",
       " ' 千千鐵騎擁塵紅，去去平吞萬里空。宛轉龍蟠金劍雪，連錢豹躩繡旗風。行收部落歸天闕，旋進封疆入帝聰。只有河源與遼海，如今全屬指麾中。',\n",
       " ' 絕壁相欹是洞門，昔人從此入仙源。數株花下逢珠翠，半曲歌中老子孫。別後自疑園吏夢，歸來誰信釣翁言。山前空有無情水，猶遶當時碧樹村。',\n",
       " ' 日照香塵逐馬蹄，風吹浪濺幾回隄。無窮羅綺填花徑，大半笙歌占麥畦。落絮却籠他樹白，嬌鶯更學別禽啼。秪緣頻燕蓬洲客，引得遊人去似迷。',\n",
       " ' 玉皇恩詔別星班，去壓徐方分野間。有鳥盡巢垂汴柳，無樓不到隔淮山。旌旗漸向行時擁，案牘應從到日閑。想憶朝天獨吟坐，旋飛新作過秦關。',\n",
       " ' 帝念瓊枝欲並芳，星分婺女寄仙郎。鸞從闕下雖辭侶，鴈到江都却續行。煙月一時搜古句，山川兩地植甘棠。即看龍虎西歸去，便佐羲軒活萬方。',\n",
       " ' 謝家山水屬君家，曾共持鉤擲歲華。竹裏竹雞眠蘚石，溪頭鸂鶒踏金沙。登樓夜坐三層月，接果春看五色花。昨日西風動歸思，滿船涼葉在天涯。',\n",
       " ' 低着煙花漠漠輕，正堪吟坐掩柴扃。亂沾細網垂窮巷，斜送陰雲入古廳。鎖却暮愁終不散，添成春醉轉難醒。霽來還有風流事，重染南山一遍青。',\n",
       " ' 傾朝朱紫正駢闐，紅杏青莎映廣筵。不道樓臺無錦繡，只愁塵土撲神仙。魚銜嫩草浮池面，蝶趂飛花到酒邊。日暮驊騮相擁去，幾人沉醉失金鞭。',\n",
       " ' 閑尋香陌鳳城東，時暫開襟向遠風。玉笛一聲芳草外，錦鴛雙起碧流中。苑邊花竹濃如繡，渭北山川澹似空。回首漢宮煙靄裏，天河金閣未央宮。',\n",
       " ' 亭午羲和駐火輪，開門嘉樹庇湖濆。行來賓客奇茶味，睡起兒童帶簟紋。屋小有時投樹影，舟輕不覺入鷗羣。陶家豈是無詩酒，公退堪驚日已曛。',\n",
       " ' 殘霞卷盡出東溟，萬古難消一片冰。公子踏開香徑蘚，美人吹滅畫堂燈。瓊輪正輾丹霄去，銀箭休催皓露凝。別有洞天三十六，水晶臺殿冷層層。',\n",
       " ' 紫詔徵賢發帝聰，繡衣行處撲香風。鶚歸秦樹幽禽散，星出吳天列舍空。捧日思馳仙掌外，朝宗勢動海門中。鞭鞘所拂三千里，多少諸侯合避驄。',\n",
       " ' 野亭歌罷指西秦，避俗爭名興各新。碧帶黃麻呈縹緲，短竿長線弄因循。夜潮分卷三江月，曉騎齊驅九陌塵。可惜人間好聲勢，片帆羸馬不相親。',\n",
       " ' 故鄉朝夕有人還，欲作家書下筆難。滅燭何曾妨夜坐，傾壺不獨爲春寒。遷來鶯語雖堪聽，落了楊花也怕看。但使他年遇公道，月輪長在桂珊珊。',\n",
       " ' 何處狂歌破積愁，攜觴共下木蘭舟。綠泉濺石銀屏濕，黃鳥逢人玉笛休。天借煙霞裝島嶼，春鋪錦繡作汀洲。一年一電逡巡事，不合花前不醉遊。',\n",
       " ' 春日皇家瑞景遲，東風無力雨微微。六宮羅綺同時泊，九陌煙花一樣飛。暖著柳絲金蘂重，冷開山翠雪稜稀。輸他得路蓬洲客，紅綠山頭爛醉歸。',\n",
       " ' 深鎖雷門宴上才，旋看歌舞旋傳杯。黃金鸂鶒當筵睡，紅錦薔薇影燭開。稽嶺好風吹玉佩，鏡湖殘月照樓臺。小儒末座頻傾耳，祗怕城頭畫角催。',\n",
       " ' 擲下籬觴指亂山，趨程不待鳳笙殘。花邊馬嚼金銜去，樓上人垂玉筯看。柳陌雖然風裊裊，蔥河猶自雪漫漫。殷勤莫厭貂裘重，恐犯三邊五月寒。',\n",
       " ' 百越風煙接巨鼇，還鄉心壯不知勞。雷霆入地建溪險，星斗逼人梨嶺高。却擁木綿吟麗句，便攀龍眼醉香醪。名場聲利喧喧在，莫向林泉改鬢毛。',\n",
       " ' 竹帛煙消帝業虛，關河空鎖祖龍居。坑灰未冷山東亂，劉項元來不讀書。',\n",
       " ' 懶脩珠翠上高臺，眉月連娟恨不開。縱使東巡也無益，君王自領美人來。',\n",
       " ' 跡暗心多感，神疲夢不遊。驚舟同厭夜，獨樹對悲秋。晚角和人戰，殘星入漢流。門前早行子，敲鐙唱離憂。',\n",
       " ' 流落常嗟勝會稀，故人相遇菊花時。鳳笙龍笛數巡酒，紅樹碧山無限詩。塵土十分歸舉子，乾坤大半屬偷兒。長楊羽獵須留本，開濟重爲闕下期。',\n",
       " ' 建元看別上元燈，處處迴廊鬬火層。珠玉亂拋高殿佛，綺羅深拜遠山僧。臨風走筆思呈惠，到曉行禪合伴能。無限喧闐留不得，月華西下露華凝。',\n",
       " ' 東南路盡吳江畔，正是窮愁暮雨天。鷗鷺不嫌斜兩岸，波濤欺得逆風船。偶逢島寺停帆看，深羨漁翁下釣眠。今古若論英達筭，鴟夷高興固無邊。',\n",
       " ' 涼風吹雨滴寒更，鄉思欺人撥不平。長有歸心懸馬首，可堪無寐枕蛩聲。嵐收楚岫和空碧，秋染湘江到底清。早晚身閑著蓑去，橘香深處釣船橫。',\n",
       " ' 翠雲交幹瘦輪囷，嘯雨吟風幾百春。深蓋屈盤青麈尾，老皮張展黑龍鱗。唯堆寒色資琴興，不放秋聲染俗塵。歲月如波事如夢，竟留蒼翠待何人。',\n",
       " ' 漢亡金鏡道將衰，便有姦臣競佐時。專國祗誇兄弟貴，舉家誰念子孫危。後宮得寵人爭附，前殿陳誠帝不疑。朱紫盈門自稱貴，可嗟區宇盡瘡痍。',\n",
       " ' 雲重寒空思寂寥，玉塵如糝滿春朝。片纔著地輕輕陷，力不禁風旋旋銷。惹砌任他香粉妒，縈叢自學小梅嬌。誰家醉卷珠簾看，弦管堂深暖易調。',\n",
       " ' 蓬門未識綺羅香，擬託良媒益自傷。誰愛風流高格調，共憐時世儉梳妝。敢將十指誇偏巧，不把雙眉鬬畫長。苦恨年年壓金線，爲他人作嫁衣裳。',\n",
       " ' 削玉森森幽思清，院家高興尚分明。捲簾陰薄漏山色，欹枕韻寒宜雨聲。斜對酒缸偏覺好，靜籠碁局最多情。却驚九陌輪蹄外，獨有溪煙數十莖。',\n",
       " ' 每聞別雁競悲鳴，却歎金籠寄此生。早是翠襟爭愛惜，可堪丹觜彊分明。雲漫隴樹魂應斷，歌接秦樓夢不成。幸自禰衡人未識，賺他作賦被時輕。',\n",
       " ' 呂望甘羅道已彰，只憑時數爲門張。世塗必竟皆應定，人事都來不在忙。要路強干情本薄，舊山歸去意偏長。因君指似封侯骨，漸擬回頭別醉鄉。',\n",
       " ' 長與韶光暗有期，可憐蜂蝶却先知。誰家促席臨低樹，何處橫釵戴小枝？麗日多情疑曲照，和風得路合偏吹。向人雖道渾無語，笑勸王孫到醉時。',\n",
       " ' 總藏心劒事儒風，大道如今已渾同。會致名津搜儁彥，是張愁網絆英雄。蘇公有國皆懸印，楚將無官可賞功。若使重生太平日，也應回首哭塗窮。',\n",
       " ' 儂家雲水本相知，每到高齋強展眉。瘦竹嚲煙遮板閣，卷荷擎雨出盆池。笑吟山色同欹枕，閑背庭陰對覆碁。不是主人多野興，肯開青眼重漁師。',\n",
       " ' 常時月好賴新晴，不似年年此夜生。初出海濤疑尚濕，漸來雲路覺偏清。寒光入水蛟龍起，靜色當天鬼魅驚。豈獨座中堪仰望，孤高應到鳳凰城。',\n",
       " ' 雕楹累棟架崔嵬，院宇生煙次第開。爲向西窗添月色，豈辭南海取花栽。意將畫地成幽沼，勢擬驅山近小臺。清境漸深官轉重，春時長是別人來。',\n",
       " ' 劒光如電馬如風，百捷長輕是掌中。無定河邊蕃將死，受降城外虜塵空。旗縫雁翅如竿褭，箭撚雕翎逐隼雄。自指燕山最高石，不知誰爲勒殊功。',\n",
       " ' 到處人皆著戰袍，麾旗風緊馬蹄勞。黑山霜重弓添硬，青冢沙平月更高。大野幾重開雪嶺，長河無限舊雲濤。鳳林關外皆唐土，何日陳兵戍不毛。',\n",
       " ' 桃花日日覓新奇，有鏡何曾及畫眉。祗恐輕梭難作匹，豈辭纖手遍生胝。合蟬巧間雙盤帶，聯鴈斜銜小折枝。豪貴大堆酬曲徹，可憐辛苦一絲絲。',\n",
       " ' 一竿青竹老江隈，荷葉衣裳可自裁。潭定靜懸絲影直，風高斜颭浪紋開。朝攜輕棹穿雲去，暮背寒塘戴月回。世上無窮嶮巇事，算應難入釣船來。',\n",
       " ' 曲沼深塘躍錦鱗，槐煙徑裏碧波新。此中境既無佳境，他處春應不是春。金牓真仙開樂席，銀鞍公子醉花塵。明年二月重來看，好共東風作主人。',\n",
       " ' 種柳開河爲勝遊，隄前常使路人愁。陰埋野色萬條思，翠束寒聲千里秋。西日至今悲兔苑，東波終不反龍舟。遠山應見繁華事，不語青青對水流。',\n",
       " ' 九衢風景盡爭新，獨占天門近紫宸。寶馬競隨朝暮客，香車爭碾古今塵。煙光正入南山色，氣勢遙連北闕春。莫見繁華祗如此，暗中還換往來人。',\n",
       " ' 渥洼奇骨本難求，況是豪家重紫騮。臕大宜懸銀壓胯，力渾欺著玉銜頭。生獰弄影風隨步，踥蹀衝塵汗滿溝。若遇丈夫能控馭，任從騎取覓封侯。',\n",
       " ' 大底榮枯各自行，兼疑陰隲也難明。無門雪向頭中出，得路雲從脚下生。深作四溟何浩渺，高爲五嶽太崢嶸。都來總向人間看，直到皇天可是平。',\n",
       " ' 石甃通渠引御波，綠槐陰裏五侯家。地衣鎮角香獅子，簾額侵鉤繡辟邪。按徹清歌天未曉，飲回深院漏猶賒。四鄰池館吞將盡，尚自堆金爲買花。',\n",
       " ' 臨春高閣擬瀛洲，貪寵張妃作勝遊。便把江山爲己有，豈知臺榭是身讐。金城暗逐歌聲碎，鐵甕潛隨舞勢休。誰識古宮堪恨處，井桐吟雨不勝秋。',\n",
       " ' 共言愁是酌離杯，況值弦歌枉大才。獻賦未爲龍化去，除書猶喜鳳銜來。花明驛路燕脂暖，山入江亭罨畫開。莫把新詩題別處，謝家臨水有池臺。',\n",
       " ' 爐中九轉鍊雖成，教主看時亦自驚。羣嶽竝天先減翠，大江臨海恐無聲。賦歸已罷吳門釣，身老仍拋楚岸耕。唯有太平方寸血，今朝盡向隗臺傾。',\n",
       " ' 折妖放豔有誰催，疑就仙中旋折來。圖把一春皆占斷，固留三月始教開。壓枝金蘂香如撲，逐朵檀心巧勝裁。好是酒闌絲竹罷，倚風含笑向樓臺。',\n",
       " ' 選勝逢君敘解攜，思和芳草遠煙迷。小梅香裏黃鶯囀，垂柳陰中白馬嘶。春引美人歌遍熟，風牽公子酒旗低。早知有此關身事，悔不前年住越溪。',\n",
       " ' 萬仞連峰積翠新，靈蹤依舊印輪巡。何如捧日安皇道，莫把回山示世人。已擘峻流穿太嶽，長扶王氣擁彊秦。爲余勢負天工背，索取風雲際會身。',\n",
       " ' 不知大廈許栖無，頻已銜泥到座隅。曾與佳人竝頭語，幾回拋却繡工夫。',\n",
       " ' 北闕同雲掩曉霞，東風春雪滿山家。瓊章定少千人和，銀樹先開六出花。',\n",
       " ' 客愁不盡本如水，草色含情更無已。又覺春愁似草生，何人種在情田裏。',\n",
       " ' 天柱香芽露香發，爛研瑟瑟穿荻篾。太守憐才寄野人，山童碾破團團月。倚雲便酌泉聲煮，獸炭潛然蚪珠吐。看著晴天早日明，鼎中颯颯篩風雨。老翠香塵下纔熟，攪時繞筯天雲綠。耽書病酒兩多情，坐對閩甌睡先足。洗我胸中幽思清，鬼神應愁歌欲成。',\n",
       " ' 堦前莎毬綠不捲，銀龜噴香挽不斷。亂花織錦柳撚線，妝點池臺畫屏展。主人公業傳國初，六親聯絡馳朝車。鬬雞走狗家世事，抱來皆佩黃金魚。却笑儒生把書卷，學得顏回忍飢面。',\n",
       " ' 信陵名重憐高才，見我長吹青眼開。便出燕姬再傾醑，此時花下逢仙侶。彎彎狂月壓秋波，兩條黃金𨴋黃霧。逸豔初因醉態見，濃春可是韶光與。纖纖軟玉捧暖笙，深思香風吹不去。檀脣呼吸宮商改，怨情漸逐清新舉。岐山取得嬌鳳雛，管中藏著輕輕語。好笑襄王大迂闊，曾臥巫雲見神女。銀鎖金簧不得聽，空勞翠輦衝泥雨。',\n",
       " ' 一雙十指玉纖纖，不是風流物不拈。鸞鏡巧梳勻翠黛，畫樓閑望擘珠簾。金杯有喜輕輕點，銀鴨無香旋旋添。因把翦刀嫌道冷，泥人呵了弄人髯。',\n",
       " ' 女媧羅裙長百尺，搭在湘江作山色。',\n",
       " ' 相逢渾不覺，祗似茂陵貧。褭褭花驕客，瀟瀟雨淨春。借書消茗困，索句寫梅真。此去青雲上，知君有幾人。',\n",
       " ' 夜久燭花落，淒聲生遠林。有懷嫌會淺，無事又秋深。黃葉歸田夢，白頭行路吟。山中亦可樂，不似此同襟。',\n",
       " ' 東海窮詩客，西風古驛亭。髮從殘歲白，山入故鄉青。世事徒三窟，兒曹且一經。丁寧速賒酒，煮栗試砂瓶。',\n",
       " ' 索索風搜客，沈沈雨洗年。殘林生獵跡，歸鳥避窰煙。節物杯漿外，溪山鬢影前。行藏都未定，筆硯或能捐。',\n",
       " ' 陰盛此宵中，多爲雨與風。坐無風雨至，看與雪霜同。抱濕離遙海，傾寒向遠空。年年不相值，還似道難通。',\n",
       " ' 落日蘆花雨，行人穀樹村。青山時問路，紅葉自知門。苜蓿窮詩味，芭蕉醉墨痕。端知棄城市，經席許頻溫。',\n",
       " ' 託根蟠泰華，倚幹蝕莓苔。誰云山澤間，而無梁棟材。',\n",
       " ' 玉人下瑤臺，香風動輕素。畫角弄江城，鳴璫月中墮。',\n",
       " ' 清風搖翠環，涼露滴蒼玉。美人胡不紉，幽香藹空谷。',\n",
       " ' 謝庭漫芳草，楚畹多綠莎。于焉忽相見，歲晏將如何。',\n",
       " ' 金谷風露涼，綠珠醉初醒。珠帳夜不收，月明墮清影。',\n",
       " ' 隨夢入池塘，無心在金谷。春風自年年，吹遍天涯綠。',\n",
       " ' 相聚即爲鄰，煙火自成簇。約伴過前溪，撐破蘼蕪綠。',\n",
       " ' 鵬程三萬里，別酒一千鍾。好景當三月，春光上國濃。',\n",
       " ' 野花紅滴滴，江燕語喃喃。鼓吹翻新調，都亭酒正酣。',\n",
       " ' 登庸趨俊乂，廁用野無遺。起喜賡歌日，明良際會時。',\n",
       " ' 鹽車淹素志，長坂入青雲。老驥春風裏，奔騰獨異羣。',\n",
       " ' 月瓣團欒翦赭羅，長條排蘂綴鳴珂。傾陽一點丹心在，承得中天雨露多。',\n",
       " ' 天北天南遶路邊，托根無處不延綿。萋萋總是無情物，吹綠東風又一年。',\n",
       " ' 𥱧箏簫管和琵琶，興滿金尊酒量賒。歌舞留春春似海，美人顏色正如花。',\n",
       " ' 溪上芙蓉映醉顏，悲秋宋玉鬢毛斑。無情最恨東流水，暗逐芳年去不還。',\n",
       " ' 會合無由歎久違，一年一度是緣非。而予願乞天孫巧，五色紉針補袞衣。',\n",
       " ' 金井涼生梧葉秋，閑看新月上簾鉤。冰壺總憶人如玉，目斷重雲十二樓。',\n",
       " ' 莎草江汀漫晚潮，翠華香撲水光遙。玉樓春暖笙歌夜，妝點花鈿上舞翹。',\n",
       " ' 紫雲團影電飛瞳，駿骨龍媒自不同。騎過玉樓金轡響，一聲嘶斷落花風。',\n",
       " ' 崚嶒高聳骨如山，遠放春郊苜蓿間。百戰沙場汗流血，夢魂猶在玉門關。',\n",
       " ' 丹湖湖上送行舟，白鴈啼殘蘆葉秋。采石江頭舊時路，題詩還憶水邊樓。',\n",
       " ' 醉臥涼陰沁骨清，石牀冰簟夢難成。月明午夜生虛籟，悞聽風聲是雨聲。',\n",
       " ' 郊外淩兢西復東，雪晴驢背興無窮。句搜明月梨花內，趣入春風柳絮中。',\n",
       " ' 新酒秦淮縮項鯿，凌霄花下共流連。別來客邸空翹首，細雨春風憶往年。',\n",
       " ' 寒燈孤對擁青氈，牢落何如似客邊。却憶花前酣後飲，醉呼明月上遙天。',\n",
       " ' 客裏逢春一惘然，梅花落盡柳如煙。無情最恨東來鴈，底事音書不肯傳。',\n",
       " ' 細草鋪茵綠滿堤，燕飛晴日正遲遲。尋芳陌上花如錦，折得東風第一枝。',\n",
       " ' 錦箏銀甲響鵾弦，勾引春聲上綺筵。醉倚闌干花下月，犀梳斜嚲鬢雲邊。',\n",
       " ' 楚雲湘雨會陽臺，錦帳芙蓉向夜開。吹罷玉簫春似海，一雙綵鳳忽飛來。',\n",
       " ' 春江新水促歸航，惜別花前酒漫觴。倒盡銀瓶渾不醉，却憐和淚入愁腸。',\n",
       " ' 誰知別易會應難，目斷青鸞信渺漫。情似藍橋橋下水，年來流恨幾時乾。',\n",
       " ' 漏滴銅龍夜已深，柳梢斜月弄疎陰。滿園芳草年年恨，剔盡燈花夜夜心。',\n",
       " ' 夜合庭前花正開，輕羅小扇爲誰裁。多情驚起雙蝴蝶，飛入巫山夢裏來。',\n",
       " ' 憶別悠悠歲月長，酒兵無計敵愁腸。柔絲漫折長亭柳，綰得同心欲寄將。',\n",
       " ' 楊柳青青映畫樓，翠眉終日鎖離愁。杜鵑啼落枝頭月，多爲傷春恨不休。',\n",
       " ' 雲色鮫綃拭淚顏，一簾春雨杏花寒。幾時重會鴛鴦侶，月下吹笙和綵鸞。',\n",
       " ' 高高山頂寺，更有最高人。定起松鳴屋，吟圓月上身。雲藏三伏熱，水散百溪津。曾乞蘭花供，無書又過春。',\n",
       " ' 愁鬢丁年白，寒燈丙夜青。不眠驚戍鼓，久客厭郵鈴。洶洶城噴海，疎疎屋漏星。十年窮父子，相守慰飄零。',\n",
       " ' 不謂高名下，終全玉雪身。交猶及前輩，語不似今人。別號行鳴鴈，遺編感獲麟。歛衣應自定，只著古衣巾。',\n",
       " ' 不比他人死，何詩可挽君。淵明元嬾仕，東野別攻文。滄海諸公淚，青山處士墳。相看莫浪哭，私諡有前聞。',\n",
       " ' 彎環青徑斜，自是野僧家。滿澗洗巖液，插天排石牙。爐寒餘栢子，架靜落藤花。記得逃兵日，門多貴客車。',\n",
       " ' 溪山兵後縣，風雪旅中人。迫夜愁嚴鼓，衝寒託軟巾。摧藏名字在，疏率饌殽真。今代徐元直，高風自可親。',\n",
       " ' 危橋橫古渡，村野帶平林。野騖寒塘靜，山禽曉樹深。雨微風矗□，雲暗雪侵尋。安道門前水，清遊豈獨吟。',\n",
       " ' 久懷聲籍甚，千里致雙魚。宦路終推轂，親幃且著書。才名賈太傅，文學馬相如。',\n",
       " ' 白髮三千丈，青春四十年。兩牙搖欲落，雙膝痺如攣。強仕非時彥，無聞惜昔賢。自期終見惡，未忍捨遺編。',\n",
       " ' 禹穴蒼茫不可探，人傳靈笈鎖煙嵐。初晴鶴點青邊嶂，欲雨龍移黑處潭。北斗齋壇天寂寂，東風仙洞草毿毿。堪憐尹叟非關吏，猶向江南逐老聃。',\n",
       " ' 沛中歌舞百餘人，帝業功成里巷新。半夜素靈先哭楚，一星遺火下燒秦。貔貅掃盡無三戶，雞犬歸來識四鄰。惆悵故園前事遠，曉風長路起埃塵。',\n",
       " ' 越公已作飛仙去，猶得潭潭好墓田。老樹背風深拓地，野雲依海細分天。青峰曉接鳴鐘寺，玉井秋澄試茗泉。我與源公舊相識，遺言瀟灑有人傳。',\n",
       " ' 江邊秋日逢任子，大理索詩吾欲忘。爲問山資何次第，祗餘丹訣轉淒涼。黃金范蠡曾辭祿，白首虞翻未信方。千古浮雲共歸思，曉風城郭水花香。',\n",
       " ' 淡竹岡前沙鴈飛，小花尖下柘丸肥。山雲不卷雨自薄，天氣欲寒人正歸。招伴祗須新稻酒，臨風猶有舊苔磯。故人舊業依稀在，怪石老松今是非。',\n",
       " ' 懷人路絕雲歸海，避俗門深草蔽丘。萬事漸消閑客夢，一年虛白少年頭。山螿啼緩從除架，淮鴈來多莫上樓。近日鄰家有新釀，每逢詩伴得淹留。',\n",
       " ' 江左風流廊廟人，荒墳拋與梵宮鄰。多年羊虎猶眠石，敗壁貂蟬祗貯塵。萬古雲山同白骨，一庭花木自青春。永思陵下猶淒切，廢屋寒風吹野薪。',\n",
       " ' 日晏霜濃十二月，林疎石瘦第三溪。雲沙有徑縈寒燒，松屋無人聞晝雞。幾聚衣冠埋作土，當年歌舞醉如泥。早知涉世真成夢，不棄山田春雨犁。',\n",
       " ' 宿雨清秋霽景澂，廣亭高樹向晨興。煙橫博望乘槎水，日上文王避雨陵。孤棹夷猶期獨往，曲闌愁絕每長憑。思鄉懷古多傷別，況此哀吟意不勝。',\n",
       " ' 百年只有百清明，狼狽今年又避兵。煙火誰開寒食禁，簪裾那復麗人行。禾麻地廢生邊氣，草木春寒起戰聲。渺渺飛鴻天斷處，古來還是闔閭城。',\n",
       " ' 策策虛樓竹隔明，悲來展轉向誰傾。天寒胡鴈出萬里，月落越雞啼四更。爲底朱顏成老色，看人青史上新名。清溪白石村村有，五尺烏犍託此生。',\n",
       " ' 人間萬卷龐眉老，眼見堂堂入草萊。行客須當下馬過，故交誰復裹雞來。山花不語如聽講，溪水無情自薦哀。猶勝黃金買碑碣，百年名字已煙埃。',\n",
       " ' 江海悠悠雪欲飛，抱書空出又空歸。沙頭人滿鷗應笑，船上酒香魚正肥。塵土竟成誰計是，山林又悔一年非。平生萬卷應夫子，兩世功名窮布衣。',\n",
       " ' 露冷風輕霽魄圓，高樓更在碧山巔。四溟水合疑無地，八月槎通好上天。黯黯星辰環紫極，喧喧朝市匝青煙。夜深獨與巖僧語，羣動消聲舉世眠。',\n",
       " ' 長安高闕此安劉，祔葬纍纍盡列侯。豐上舊居無故里，沛中原廟對荒丘。耳聞明主提三尺，眼見愚民盜一坯。千載腐儒騎瘦馬，渭城斜月重回頭。',\n",
       " ' 西入潼關路，何時更盍簪。年來人事改，老去鬢毛侵。花染離筵淚，葵傾報國心。龍潭千尺水，不似別情深。',\n",
       " ' 日晚宿留城，人家半掩門。羣鴉棲老樹，一犬吠荒村。爭買魚添價，新篘酒帶渾。船頭對新月，誰與共清論。',\n",
       " ' 客路三千里，西風兩鬢塵。貪名笑吳起，說國歎蘇秦。託興非耽酒，思家豈爲蒪。可憐今夜月，獨照異鄉人。',\n",
       " ' 三山江上寺，宮殿望岧嶤。石徑侵高樹，沙灘半種苗。一僧歸晚日，羣鷺宿寒潮。遙聽風鈴語，興亡話六朝。',\n",
       " ' 江上見危磯，人形立翠微。妾來終日望，夫去幾時歸。明月空懸鏡，蒼苔漫補衣。可憐雙淚眼，千古斷斜暉。',\n",
       " ' 江湖分兩路，此地是通津。雲淨山浮翠，風高浪潑銀。人行俱是客，舟住即爲鄰。俯仰煙波內，蜉蝣寄此身。',\n",
       " ' 水昏天色晚，崖下泊行舟。獨客傷歸鴈，孤眠歎野鷗。溪聲牽別恨，鄉夢惹離愁。酒醒推篷坐，淒涼望女牛。',\n",
       " ' 五老峰巔望，天涯在目前。湘潭浮夜雨，巴蜀暝寒煙。泰華根同峙，嵩衡脈共聯。憑虛有仙骨，日月看推遷。',\n",
       " ' 野菊西風滿路香，雨花臺上集壺觴。九重天近瞻鍾阜，五色雲中望建章。綠酒莫辭今日醉，黃金難買少年狂。清歌驚起南飛鴈，散作秋聲送夕陽。',\n",
       " ' 白雲紅樹路紆縈，古殿長廊次第行。南望水連桃葉渡，北來山枕石頭城。一塵不到心源淨，萬有俱空眼界清。竹院逢僧舊曾識，旋披禪衲爲相迎。',\n",
       " ' 雲淨南山紫翠浮，憑陵絕頂望悠悠。偶逢佳節牽詩興，漫把芳尊遣客愁。霜染鴉楓迎日醉，寒衝涇水帶冰流。烏紗頻岸西風裏，笑插黃花滿鬢秋。',\n",
       " ' 碧樹涼生宿雨收，荷花荷葉滿汀洲。登高有酒渾忘醉，慨古無言獨倚樓。宮殿六朝遺古跡，衣冠千古漫荒丘。太平時節殊風景，山自青青水自流。',\n",
       " ' 蘭陵市上忽相逢，敘別殷勤興倍濃。良會若同雞黍約，暫時不放酒杯空。愁牽白髮三千丈，路入青山幾萬重。行色一鞭催去馬，畫橋嘶斷落花風。',\n",
       " ' 下馬天未明，風高雪何急。須臾路欲迷，頃刻山盡白。雞犬寂無聲，曙光射寒色。荒村絕煙火，髯凍布袍濕。王事不可緩，行行動悽惻。',\n",
       " ' 新辭翦秋水，洗我胸中塵。無由愜良會，極目空懷人。醉來拔劍歌，字字皆陽春。',\n",
       " ' 輕黃著柳條，新春喜更始。感時重搔首，悵望不能已。無由託深情，傾瀉芳尊裏。',\n",
       " ' 明月入我室，天風吹我袍。良夜最岑寂，旅況何蕭條。馳情望海波，一鶴鳴九臯。',\n",
       " ' 悠悠括城北，眄眄巖泉西。宿草暝煙綠，苦竹含雲低。幽懷不可託，鷓鴣空自啼。',\n",
       " ' 春風吹愁端，散漫不可收。不如古溪水，祗望鄉江流。',\n",
       " ' 新花紅爍爍，舊花滿山白。昔日金張門，狼籍餘廢宅。',\n",
       " ' 回頭語春風，莫向新花叢。我見朱顏人，多金亦成翁。',\n",
       " ' 多金不足惜，丹砂亦何益。更種明年花，春風自相識。',\n",
       " ' 騄驥初失羣，亦自矜趫騰。俛仰歲時久，帖然困蚊蠅。豪鯨逸其穴，尺水成滄溟。豈無魚鼈交，望望爲所憎。物理有翕張，達人同廢興。幸無怵迫憂，聊復曲吾肱。',\n",
       " ' 魚目出泥沙，空村百金珍。豫章值擁輳，細細供蒸薪。論材何必多，適用即能神。託交何必深，寡求永相親。鮑叔拙羇魯，張生窮厄陳。茫然扳援際，豈意出風塵。',\n",
       " ' 貧賤如故舊，少壯即相依。中心不敢厭，但覺少光輝。向來乘時士，亦有能奮飛。一朝權勢歇，欲退無所歸。不如行其素，辛苦奈寒飢。人生繫天運，何用發深悲。',\n",
       " ' 我居在窮巷，來往無華軒。辛勤衣食物，出此二畝園。薤菘鬱朝露，桑柘浮春煙。以茲亂心曲，智計無他奸。擇勝不在奢，興至發清言。相逢樵牧徒，混混誰愚賢。',\n",
       " ' 松風四山來，清宵響瑤琴。聽之不能寐，中有怨歎音。旦起繞其樹，磈砢不計尋。清陰可敷席，有酒誰與斟。由來大度士，不受流俗侵。浩歌相倡答，慰此霜雪心。',\n",
       " ' 中年涉事熟，欲學唾面婁。逡巡避少年，赴穢不敢詶。旁人吁已甚，自喜計慮周。微勞消厚疚，殘辱勝深憂。從知爲下安，處上反無儔。人生各有志，勇懦從所求。',\n",
       " ' 古人重畎畝，有祿不待干。德成祿自至，釋耒列王官。不仕亦不貧，本自足饔飱。後世恥躬耕，號呼脫飢寒。我生千𥜥後，念此愧在顏。爲農倘可飽，何用出柴關。',\n",
       " ' 村郊多父老，面垢頭如蓬。我嘗使之年，言語不待工。古來名節士，敢望彭城龔。有叟誚其後，更恨道不通。鄙哉譊譊者，爲隘不爲通。低頭拜野老，負米吾願從。',\n",
       " ' 去年秋事荒，販糴仰鄰州。健者道路間，什百成朋儔。今年漸向熟，庶幾民不流。書生自無田，與衆同喜憂。作詩勞鄰曲，有倡誰與詶。亦無采詩者，此修何可修。',\n",
       " ' 近山如畫牆，遠山如帚長。我從雲中來，回頭白茫茫。惜去乃爾覺，常時自相忘。相忘豈不佳，遣此懷春傷。飄灑從何來，衣巾濕微涼。初疑風雨集，冉冉遊塵黃。無歸亦自可，信美非吾鄉。登舟望東雲，猶向帆端翔。',\n",
       " ' 悠悠循澗行，磊磊據石坐。林垂短長雲，山綴丹碧顆。蓼花最無數，照水嬌婀娜。何知是節序，風日自清妥。羣童競時新，萬果間蔬蓏。欣然爲之醉，烏帽危不墮。此日山中懷，孟公不如我。',\n",
       " ' 驕雲飛散雨，隨風爲有無。老農終歲心，望施在須臾。平生官田粟，長此禮義軀。置之且勿戚，一飽任妻孥。',\n",
       " ' 青青澤中蒲，九夏氣淒寒。翾翾翠碧羽，照影蒼溪間。巢由薄天下，俗士榮一官。小大各有適，自全良獨難。',\n",
       " ' 窮居無公憂，私此長夏日。蚊蠅如俗子，正爾相妒嫉。麾驅非吾任，遁避亦無術。惟當俟其定，靜坐萬慮一。',\n",
       " ' 落日下遙峰，荒村倦行履。停車息茅店，安寢正鼾睡。忽聞扣門急，云是下鄉隸。公文捧花柙，鷹隼駕聲勢。良民懼官府，聽之肝膽碎。阿母出搪塞，老脚走顛躓。小心事延欵，□餘糧復匱。東鄰借種雞，西舍覓芳醑。再飯不厭飽，一飲直呼醉。明朝怯見官，苦苦燈前跪。使我不成眠，爲渠滴清淚。民膏日已瘠，民力日愈弊。空懷伊尹心，何補堯舜治。',\n",
       " ' 堤樹生晝涼，濃陰撲空翠。孤舟喚野渡，村疃入幽邃。高軒俯清流，一犬隔花吠。童子立門牆，問我向何處？主人聞故舊，出迎時倒屣。驚迓敘間闊，屈指越寒暑。殷勤爲延欵，偶爾得良會。春盤擘紫蝦，冰鯉斫銀鱠。荷梗白玉香，荇菜青絲脆。臘酒擊泥封，羅列總新味。移席臨湖濱，對此有佳趣。流連送深杯，賓主共忘醉。清風岸烏紗，長揖謝君去。世事如浮雲，東西渺煙水。',\n",
       " ' 久聞南明山，共慕南明寺。幾度欲登臨，日逐擾人事。于焉偶閑暇，鳴轡忽相聚。乘興樂遨遊，聊此托佳趣。涉水渡溪南，迢遙翠微裏。石磴千疊斜，峭壁半空起。白雲鎖峰腰，紅葉暗溪嘴。長藤絡虛巖，疎花映寒水。金銀拱梵剎，丹青照廊宇。石梁臥秋溟，風鈴作簷語。深洞結苔陰，嵐氣滴晴雨。羊腸轉咫尺，鳥道轉千里。屈曲到禪房，上人喜延竚。香分宿火薰，茶汲清泉煮。投閑息萬機，三生有宿契。行廚出盤飧，擔甕倒芳醑。脫冠挂長松，白石籍憑倚。宦途勞營營，暫此滌塵慮。鬮令促傳觴，投壺更聯句。興來較勝負，醉後忘爾汝。忽聞吼蒲牢，落日下雲嶼。長嘯出煙蘿，揚鞭賦歸去。',\n",
       " ' 姑孰多紫蝦，獨有湖陽優。出產在四時，極美宜於秋。雙箝鼓繁鬚，當頂抽長矛。鞠躬見湯王，封作朱衣侯。所以供盤餐，羅列同珍羞。蒜友日相親，瓜朋時與儔。既名釣詩釣，又作鉤詩鉤。于時同相訪，數日承欵留。厭飲多美味，獨此心相投。別來歲云久，馳想空悠悠。銜杯動遐思，口涎空流。封緘託雙鯉，于焉來遠求。慷慨胡隱君，果肯分惠否。',\n",
       " ' 春風吹蠶細如蟻，桑芽纔努青鴉嘴。侵晨探采誰家女，手挽長條淚如雨。去歲初眠當此時，今歲春寒葉放遲。愁聽門外催里胥，官家二月收新絲。',\n",
       " ' 沙頭小燕鳴春和，楊柳垂絲煙倒拖。將軍樓船發浩歌，雲檣高插天嵯峨。白虹走香傾翠壺，勸飲花前金叵羅。神鰲駕粟升天河，新承雨澤浮恩波。',\n",
       " ' 西園晚霽浮嫩涼，開尊漫摘葡萄嘗。滿架高撐紫絡索，一枝斜嚲金琅璫。天風颼颼葉栩栩，蝴蝶聲乾作晴雨。神蛟清夜蟄寒潭，萬片濕雲飛不起。石家美人金谷遊，羅幃翠幕珊瑚鉤。玉盤新薦入華屋，珠帳高懸夜不收。勝遊記得當年景，清氣逼人毛骨冷。笑呼明鏡上遙天，醉倚銀牀弄秋影。',\n",
       " ' 湖田十月清霜墮，晚稻初香蟹如虎。扳罾拖網取賽多，篾簍挑將水邊貨。縱橫連爪一尺長，秀凝鐵色含湖光。蟛蜞石蟹已曾食，使我一見驚非常。買之最厭黃髯老，償價十錢尚嫌少。漫誇丰味過蝤蛑，尖臍猶勝團臍好。充盤煮熟堆琳琅，橙膏醬渫調堪嚐。一斗擘開紅玉滿，雙螯出瓊酥香。岸頭沽得泥封酒，細嚼頻斟弗停手。西風張翰苦思鱸，如斯丰味能知否。物之可愛尤可憎，嘗聞取刺於青蠅。無腸公子固稱美，弗使當道禁橫行。',\n",
       " ' 譙樓夜促蓮花漏，樹陰搖月蛟螭走。蟠拏對月吸深杯，月府清虛玉兔吼。翠盤擘脯臙脂香，碧碗敲冰分蔗漿。十載番思舊時事，好懷不似當年狂。夜合花香開小院，坐愛涼風吹醉面。酒中彈劍發清歌，白髮年來爲愁變。',\n",
       " ' 短牆荒圃四無鄰，烈火緋桃照地春。坐久好風休掩袂，夜來微雨已霑巾。敢同俗態期青眼，似有微詞動絳脣。盡日更無鄉井念，此時何必見秦人。',\n",
       " ' 小院無人夜，煙斜月轉明。清宵易惆悵，不必有離情。',\n",
       " ' 霽景明如練，繁英杏正芳。姮娥應有語，悔共雪爭光。',\n",
       " ' 認得前家令，宮人淚滿裾。不知梁佐命，全是沈尚書。',\n",
       " ' 我愛竇高士，棄官仍在家。爲嫌句漏令，兼不要丹砂。',\n",
       " ' 王母清歌玉琯悲，瑤臺應有再來期。穆王不得重相見，恐爲無端哭盛姬。',\n",
       " ' 楚天遙望每長嚬，宋玉襄王盡作塵。不會瑤姬朝與暮，更爲雲雨待何人。',\n",
       " ' 一室清羸鶴體孤，氣和神瑩爽冰壺。吳中高士雖求死，不那稽山有謝敷。',\n",
       " ' 所忠無處訪相如，風笈塵編跡尚餘。惟有孝標情最厚，一編遺在茂陵書。',\n",
       " ' 絆惹春風別有情，世間誰敢鬬輕盈。楚王江畔無端種，餓損纖腰學不成。',\n",
       " ' 漢川城上角三呼，扈蹕防邊列萬夫。褒姒冢前烽火起，不知泉下破顏無。',\n",
       " ' 昭烈遺黎死尚羞，揮刀斫石恨譙周。如何千載留遺廟，血食巴山伴武侯。',\n",
       " ' 杏豔桃光奪晚霞，樂遊無廟有年華。漢朝冠蓋皆陵墓，十里宜春漢苑花。',\n",
       " ' 鳥去雲飛意不通，夜壇斜月轉松風。君主寂慮無消息，却就閑人覓巨公。',\n",
       " ' 振鷺翔鸞集禁闈，玉堂珠樹瑩風儀。不知新到靈和殿，張緒何如柳一枝。',\n",
       " ' 顏色無因饒錦繡，馨香惟解掩蘭蓀。那堪更被煙蒙蔽，南國西施泣斷魂。',\n",
       " ' 數枝高柳帶鳴鴉，一樹山榴自落花。已是向來多淚眼，短亭回首在天涯。',\n",
       " ' 野客乘軺非所宜，況將儒懦報戎機。錦江不識臨邛酒，且免相如渴病歸。',\n",
       " ' 紛紛從此見花殘，轉覺長繩繫日難。樓上有愁春不淺，小桃風雪凭闌干。',\n",
       " ' 千載遺蹤寄薜蘿，沛中鄉里舊山河。長陵亦是閑丘隴，異日誰知與仲多。',\n",
       " ' 漢嗣安危繫數君，高皇決意勢難分。張良口辨周昌吃，同建儲宮第一勛。',\n",
       " ' 四漢儲宮定不傾，可能園綺勝良平。舉朝公將無全策，借請閑人羽翼成。',\n",
       " ' 數載從軍似武夫，今隨戎捷氣偏粗。漢皇若問何爲者，免道高陽舊酒徒。',\n",
       " ' 人世仙家本自殊，何須相見向中途。驚鴻瞥過遊龍去，漫惱陳王一事無。',\n",
       " ' 秋杪方攀玉樹枝，隔年無計待春暉。自嫌暫作仙城守，不逐鶯來共燕飛。',\n",
       " ' 馮家舊宅閉柴關，修竹猶存潏水灣。應繫星辰天上去，不留英骨葬人間。',\n",
       " ' 千門萬戶鞠蒿藜，斷燼遺垣一望迷。惆悵建章鴛瓦盡，夜來空見玉繩低。',\n",
       " ' 何緣春恨貯離憂，欲入空門萬事休。水月定中何所謂，也嚬眉黛托腮愁。',\n",
       " ' 漢文窮相作前王，慳惜明珠不斗量。翡翠鮫鮹何所直，千裨萬接上書囊。',\n",
       " ' 塵土無因狎隱淪，青山一望每傷神。可能前嶺空喬木，應有懷才抱器人。',\n",
       " ' 朱雀街東半夜驚，楚魂湘夢兩徒清。五更撩亂趨朝火，滿口塵埃亦數聲。',\n",
       " ' 異鄉丹旐已飄揚，一顧深知實未亡。任被褚裒泉下笑，重將北面哭真長。',\n",
       " ' 麻衣穿穴兩京塵，十見東堂綠桂春。今日競飛楊葉箭，魏舒休作畫籌人。',\n",
       " ' 竹映風窗數陣斜，旅人愁坐思無涯。夜來留得江湖夢，全爲乾聲似荻花。',\n",
       " ' 柳短莎長溪水流，雨微煙暝立溪頭。寒鴉閃閃前山去，杜曲黃昏獨自愁。',\n",
       " ' 嚴陵情性是真狂，抵觸三公傲帝王。不怕舊交嗔僭越，喚他侯霸作君房。',\n",
       " ' 草草招提強據鞍，周師乘勝莫回看。背城肯戰知虛實，爭奈人前忍笑難。',\n",
       " ' 偏信由來惑是非，一言邪佞脫危機。張儀重入懷王手，駟馬安車却放歸。',\n",
       " ' 月殿真妃下綵煙，漁陽追虜及湯泉。君王指點新豐樹，幾不親留七寶鞭。',\n",
       " ' 欲寫愁腸愧不才，多情練漉已低摧。窮郊二月初離別，獨傍寒村嗅野梅。',\n",
       " ' 十頃狂風撼麴塵，緣堤照水露紅新。世間花氣皆愁絕，恰是蓮香更惱人。',\n",
       " ' 蝶戀晚花終不去，鷗逢春水固難飛。野人心地都無著，伴蝶隨鷗亦不歸。',\n",
       " ' 清淺縈紆一水間，竹岡藤樹小躋攀。露沾荒草行人過，月上高林宿鳥還。江遶武侯籌筆地，雨昏張載勒銘山。異鄉一笑因酣醉，忘却愁來鬢髮斑。',\n",
       " ' 一去仙居似轉蓬，再經花謝倚春叢。醉中篇什金聲在，別後音書錦字空。長憶映碑逢若士，未曾攜杖逐壺公。東風狼籍苔侵徑，蕙草香銷杏帶紅。',\n",
       " ' 槐柳蕭疎溽暑收，金商頻伏火西流。塵衣歲晚緣身賤，雨簟更深滿背秋。前事悲涼何足道，遠書慵懶未能修。惟思待月高梧下，更就東牀訪惠休。',\n",
       " ' 玉簡金文直上清，禁垣丹地閉嚴扃。黃扉議政參元化，紫殿稱觴拂壽星。萬戶千門迷步武，非煙非霧隔儀形。塵中舊侶無音信，知道遼東鶴姓丁。',\n",
       " ' 鳥囀蜂飛日漸長，旅人情味悔思量。禪門澹薄無心地，世事生疎欲面牆。二月雲煙迷柳色，九衢風土帶花香。大知高士禁愁寂，試倚闌干莫斷腸。',\n",
       " ' 有客傷春復怨離，夕陽亭畔草青時。淚從紅蠟無由制，腸比朱弦恐更危。梅向好風惟是笑，柳因微雨不勝垂。雙溪未去饒歸夢，夜夜孤眠枕獨欹。',\n",
       " ' 近者蘇司業，文雄道最光。夫君居太學，妙譽繼中行。汲郡陵初發，汾陰篋久亡。寂寥方倚席，容易忽升堂。去日應懸榻，來時定裂裳。愜心頻拾芥，應手屢穿楊。辯急如無敵，飛騰固自強。論心期舌在，問事畏頭長。駟馬終題柱，諸生悉面牆。啗螯譏爾雅，賣餅訴公羊。未見泥函谷，俄驚火建章。煙塵昏象魏，行在隔巴梁。紅粟填郿塢，青袍過壽陽。翦茅行殿濕，伐栢舊陵香。黌室青衿盡，渠門火斾揚。雲飛同去國，星散各殊方。賤子悲窮轍，當年亦擅場。齏辛尋幼婦，醴酒憶先生。聖域探姬孔，皇風樂禹湯。畏誅輕李喜，言命小臧倉。折樹休盤槊，沈鉤且釣璜。鴻都問詞客，他日莫相忘。',\n",
       " ' 報國捐軀實壯夫，楚囚垂欲復神都。雲臺畫像皆何者，青史書名或不孤。散卒半隨袁校尉，寡妻休問辟司徒。聞君敗績無歸計，氣激星辰坐向隅。',\n",
       " ' 冊府藏餘烈，皇綱正本朝。不聽還笏諫，幾覆綴旒祧。咫尺言終直，愴惶道已消。淚心傳位日，揮涕授遺朝。飛燕潛來趙，黃龍豈見譙。既迷秦帝鹿，難問賈生鵰。穆卜緘縢秘，金根轍跡遙。北軍那奪印，東海漫難橋。羅織黃門訟，笙簧白骨銷。炎方無信息，丹旐竟淪漂。邂逅江魚食，淒涼楚客招。文忠徒諡議，子卯但簫韶。未見公侯復，尋傷嗣續凋。流年隨水逝，高誼薄層霄。柱石林公遠，縑緗故國饒。奇蹤天驥活，遺軸錦鸞翹。近者淮夷戮，前年歸馬調。始聞移北葬，兼議蔭山苗。聖澤覃將溥，貞魂喜定飄。異時窮巷客，懷古漫成謠。',\n",
       " ' 朱邸平臺隔禁闈，貴遊陳跡尚依稀。雲低雍畤祈年去，雨細長楊縱獵歸。申白賓朋傳道義，應劉文彩寄音徽。承平舊物惟君盡，猶寫雕鞍伴六飛。',\n",
       " ' 淡霧輕雲匝四垂，綠塘秋望獨顰眉。野蓮隨水無人見，寒鷺窺魚共影知。九陌要津勞目擊，五湖閑夢誘心期。孤燈夜夜愁欹枕，一覺滄洲似昔時。',\n",
       " ' 上巳接寒食，鶯花寥落晨。微微潑火雨，草草踏青人。涼似三秋景，清無九陌塵。與余同病者，對此合傷神。',\n",
       " ' 移從杜城曲，置在小齋東。正是高秋裏，仍兼細雨中。結根方迸竹，疎蔭託高桐。苒苒齊芳草，飄飄笑斷蓬。片時留靜者，一夜響鳴蛩。野露通宵滴，溪煙盡日蒙。試才卑庾薤，求味笑周菘。只此霜栽好，他時贈伯翁。',\n",
       " ' 爲笑江南種稻時，露蟬鳴後雨霏霏。蓮盆積潤分畦小，藻井垂陰擢秀稀。得地又生金象界，結根仍對水田衣。支公尚有三吳思，更使幽人憶釣磯。',\n",
       " ' 無處不飄揚，高樓臨道旁。素娥前夕月，青女夜來霜。宿雨隨時潤，秋晴著物光。幽懷長若此，病眼更相妨。蜀紙裁深色，燕脂落靚粧。低叢侵小閣，倒影入迴塘。謝朓留霞綺，甘寧棄錦張。何人休遠道，是處有斜陽。薜荔垂書幌，梧桐墜井牀。晚風生旅館，寒籟近僧房。桂綠明淮甸，楓丹照楚鄉。鴈疎臨鄠杜，蟬急傍瀟湘。樹異桓宣武，園非顧辟疆。茂陵愁臥客，不自保危腸。',\n",
       " ' 一宿南塘煙雨時，好風搖動綠波微。驚離曉岸衝花去，暖下春汀照影飛。華屋撚弦彈鼓舞，綺窗含筆澹毛衣。畫屏見後長迴首，爭得雕籠莫放歸。',\n",
       " ' 日下蕪城莽蒼中，濕螢撩亂起衰叢。寒煙陳后長門閉，夜雨隋家舊苑空。星散欲陵前檻月，影低如試北窗風。羇人此夕方愁緒，心似寒灰首似蓬。',\n",
       " ' 翠竹高梧夾後溪，勁風危露雨淒淒。那知北牖殘燈暗，又送西樓片月低。清夜更長應未已，遠煙尋斷莫頻嘶。羇人此夕如三歲，不整寒衾待曙雞。',\n",
       " ' 露白風清夜向晨，小星垂佩月埋輪。絳河浪淺休相隔，滄海波深尚作塵。天外鳳皇何寂寞，世間烏鵲漫辛勤。倚闌殿北斜樓上，多少通宵不寐人。',\n",
       " ' 一夜高樓萬景奇，碧天無際水無涯。只留皎月當層漢，並送浮雲出四維。霧靜不容玄豹隱，冰生惟恐夏蟲疑。坐來離思憂將曉，爭得嫦娥仔細知。',\n",
       " ' 斷腸佳賞固難期，昨夜銷魂更不疑。丹桂影空蟾有露，綠槐陰在鵲無枝。賴將吟詠聊惆悵，早是疎頑耐別離。堪恨賈生曾慟哭，不緣清景爲憂時。',\n",
       " ' 才子南遊多遠情，閑舟蕩漾任春行。新安江上長如此，何似新安太守清。',\n",
       " ' 景爲春時短，愁隨別夜長。暫碁寧號隱，輕醉不成鄉。風雨曾通夕，莓苔有衆芳。落花如便去，樓上即河梁。',\n",
       " ' 麝炷騰清燎，鮫紗覆綠蒙。宮妝臨曉日，錦段落東風。無力春烟裏，多愁暮雨中。不知何事意，深淺兩般紅。',\n",
       " ' 真宰多情巧思新，固將能事送殘春。爲雲爲雨徒虛語，傾國傾城不在人。開日綺霞應失色，落時青帝合傷神。嫦娥婺女曾相送，留下鵶黃作蘂塵。',\n",
       " ' 松拂疎窗竹映闌，素琴幽怨不成彈。清宵霽極雲離岫，紫禁風高露滿盤。晚蝶飄零驚宿雨，暮鴉淩亂報秋寒。高樓瞪目歸鴻遠，如信嵇康欲畫難。',\n",
       " ' 聞道離鸞思故鄉，也知情願嫁王昌。塵埃一別楊朱路，風月三年宋玉牆。下疾不成雙點淚，斷多難到九迴腸。庭前佳樹名梔子，試結同心寄謝娘。',\n",
       " ' 春思春愁一萬枝，遠村遙岸寄相思。西園有雨和苔長，南內無人拂檻垂。遊客寂寥緘遠恨，暮鶯啼呌惜芳時。晚來飛絮如霜鬢，恐爲多情管別離。',\n",
       " ' 一寸迴腸百慮侵，旅愁危涕兩爭禁。天涯已有銷魂別，樓上寧無擁鼻吟。感事不關河裏笛，傷心應倍雍門琴。春雲更覺愁于我，閑蓋低村作暝陰。',\n",
       " ' 日烈風高野草香，百花狼籍柳披猖。連天瑞靄千門遠，夾道新陰九陌長。衆飲不歡逃席酒，獨行無味放遊韁。年來與問閑遊者，若箇傷春向路旁。',\n",
       " ' 綺陌夜來雨，春樓寒望迷。遠客迎燕戲，亂響隔鶯啼。有恨開蘭室，無言對李蹊。花欹渾拂檻，柳重欲垂堤。燈檠昏魚目，薰爐咽麝臍。別輕天北鶴，夢怯汝南雞。入戶侵羅幌，捎簷潤繡題。新豐樹已失，長信草初齊。亂蝶寒猶舞，驚烏暝不栖。庾郎盤馬地，却怕有春泥。',\n",
       " ' 漢代金爲屋，吳宮綺作寮。豔詞傳靜婉，新曲定妖嬈。箭響猶殘夢，籤聲報早朝。鮮明臨曉日，迴轉度春宵。半袖籠清鏡，前絲壓翠翹。靜多如有待，閑極似無憀。梓澤花猶滿，靈和柳未凋。障昏巫峽雨，屏掩浙江潮。未信潘名岳，應疑史姓蕭。漏因歌暫斷，燈爲雨頻挑。飲酒闌三雅，投壺賽百嬌。鈿蟬新翅重，金鴨舊香焦。水淨疑澄練，霞孤欲建標。別隨秦柱促，愁爲蜀弦么。玄晏難瘳痹，臨邛但發痟。聯詩徵弱絮，思友詠甘蕉。王氏憐諸謝，周郎定小喬。黼幃翹綵雉，波扇畫文鰩。荇密妨垂釣，荷欹欲度橋。不因衣帶水，誰覺路迢迢。',\n",
       " ' 青帝於君事分偏，穠堆浮豔倚朱門。雖然占得笙歌地，將甚酬他雨露恩。',\n",
       " ' 劉表荒碑斷水濱，廟前幽草閉殘春。已將愁淚留斑竹，又感悲風入白蘋。八族未來誰北拱，四凶猶在莫南巡。九峰相似堪疑處，望見蒼梧不見人。',\n",
       " ' 獨來成悵望，不去泥欄干。',\n",
       " ' 層閣疊危壁，瑞因千古名。幾連揚子路，獨倚潤州城。雲近銜江色，鵰高背磬聲。僧居上方久，端坐見營營。',\n",
       " ' 院深塵自外，如佛值玄公。常跡或非次，志門因得中。衣巾離暑氣，牀榻向涼風。是事不逾分，秪應明德同。',\n",
       " ' 甌閩在郊外，師院號東禪。物得居來正，人經論後賢。瓟槽柳塞馬，蓋地月支綖。鸛鵲尚巢頂，誰堪舉世傳。',\n",
       " ' 大溈清復深，萬象影沈沈。有客衣多毳，空門偈勝金。王侯皆作禮，陸子只來吟。我問師心處，師言無處心。',\n",
       " ' 愁多難得寐，展轉讀書牀。不是旅人病，豈知秋夜長。歸鄉憑遠夢，無夢更思鄉。枕上移窗月，分明是淚光。',\n",
       " ' 旅人遊汲汲，春氣又融融。農事蛙聲裏，歸程草色中。獨慙出穀雨，未變暖天風。子玉和予去，應憐恨不窮。',\n",
       " ' 桐廬江水閑，終日對柴關。因想別離處，不知多少山。釣舟春岸泊，庭樹曉鶯還。莫便求棲隱，桂枝堪恨顏。',\n",
       " ' 隴樹塞風吹，遼城角幾枝。霜凝無暫歇，君貌莫應衰。萬里平沙際，一行邊鴈移。那堪朔煙起，家信正相離。',\n",
       " ' 隨風身不定，今夜在蒼梧。客淚有時有，猨聲無處無。潮添瘴海闊，煙拂粤山孤。却憶零陵住，吟詩半玉壺。',\n",
       " ' 菴前古折碑，夜靜念經時。月皎海霞散，露濃山草垂。鬼聞拋故塚，禽聽離寒枝。想得天花墜，馨香拂白眉。',\n",
       " ' 湖州安吉縣，門與白雲齊。禹力不到處，河聲流向西。去衙山色遠，近水月光低。中有高人在，沙中曳杖藜。',\n",
       " ' 良夜歲應足，嚴風爲變春。遍回寒作暖，通改舊成新。秀樹因馨雨，融冰雨泛蘋。韶光不偏黨，積漸煦疲民。',\n",
       " ' 柳色尚沈沈，風吹秋更深。山河空遠道，鄉國自鳴砧。巷有千家月，人無萬里心。長城哭崩後，寂絕至如今。',\n",
       " ' 峩峩雙髻山，瀑布瀉雲間。塵世自疑水，禪門長去關。茯神松不異，藏寶石俱閑。向此師清業，如何方可攀。',\n",
       " ' 不學世所惜，是何無了公。靈匡虛院外，虎跡亂山中。晝夜必連去，古今爭敢同。禪情豈堪問，問答更無窮。',\n",
       " ' 王君上升處，信首古居前。皂樹即須朽，白龜應亦全。雲間猶一日，塵裏已千年。碧色壇如黛，時人誰可仙。',\n",
       " ' 舊居桐栢觀，歸去愛安閑。倒樹造新屋，化人修古壇。晚花霜後落，山雨夜深寒。應有同溪客，相尋學鍊丹。',\n",
       " ' 年高來遠戍，白首罷干戎。夜色薊門火，秋聲邊塞風。磧浮悲老馬，月滿引新弓。百戰陰山去，唯添上將雄。',\n",
       " ' 繫馬向山立，一桮聊奠君。野煙孤客路，寒草故人墳。琴韻歸流水，詩情寄白雲。日斜休哭後，松韻不堪聞。',\n",
       " ' 野寺度殘夏，空房欲暮時。夜聽猨不睡，秋思客先知。竹迥煙生薄，山高月上遲。又登塵路去，難與老僧期。',\n",
       " ' 浮世師休話，晉時燈照巖。禽飛穿靜戶，藤結入高杉。存沒詩千首，廢興經數函。誰知將俗耳，來此避囂讒。',\n",
       " ' 秦築長城在，連雲磧氣侵。風吹邊草急，角絕塞鴻沈。世世征人往，年年戰骨深。遼天望鄉者，迴首盡霑襟。',\n",
       " ' 寺還名玉泉，澄水亦遭賢。物尚猶如此，人爭合偶然。溪流雲斷外，山峻鳥飛還。初日長廊下，高僧正坐禪。',\n",
       " ' 早被嬋娟誤，欲妝臨鏡慵。承恩不在貌，教妾若爲容。風暖鳥聲碎，日高花影重。年年越溪女，相憶采芙蓉。',\n",
       " ' 不掩盈窗日，天然格調高。涼風移蟋蟀，落葉在離騷。迴筆挑燈燼，懸圖見海潮。因論三國志，空載幾英豪。',\n",
       " ' 萬里重山遶福州，南橫一道見溪流。天邊飛鳥東西沒，塵裏行人早晚休。曉日青山當大海，連雲古塹對高樓。那堪望斷他鄉目，只此蕭條自白頭。',\n",
       " ' 齊心樓上望浮雲，萬古千秋空姓名。堯水永銷天際去，姬風一變世間平。高蹤盡共煙霞在，大道長將日月明。從此安然寰海內，後來無復謾相傾。',\n",
       " ' 昇山自古道飛來，此是神功不可猜。氣色雖然離禹穴，峰巒猶自接天台。巖邊折樹泉衝落，頂上浮雲日照開。南望閩城塵世界，千秋萬古卷塵埃。',\n",
       " ' 三年翦拂感知音，哭向青山永夜心。竹在曉煙孤鳳去，劍荒秋水一龍沈。新墳日落松聲小，舊色春殘草色深。不及此時親執紼，石門遙想淚霑襟。',\n",
       " ' 良匠用材爲塔了，神光寺更得高名。風雲會處千尋出，日月中時八面明。海水旋流倭國野，天文方戴福州城。相輪頂上望浮世，塵裏人心應總平。',\n",
       " ' 開元寺裏七重塔，遙對方山影擬齊。雜俗人看離世界，孤高僧上覺天低。唯堪片片紫霞映，不與濛濛白霧迷。心若無私羅漢在，參差免向日虹西。',\n",
       " ' 荒郊一望欲消魂，涇水縈紆傍遠村。牛馬放多春草盡，原田耕破古碑存。雲和積雪蒼山晚，煙伴殘陽綠樹昏。數里黃沙行客路，不堪回首思秦原。',\n",
       " ' 灼灼春園晚色分，露珠千點映寒雲。多情舞蝶穿花去，解語流鶯隔水聞。冷酒桮中宜泛灩，暖風林下自氛氳。仙桃不肯全開拆，應借餘芳待使君。',\n",
       " ' 黃紙晴空墜一緘，聖朝恩澤洗冤讒。李膺門客爲閑客，梅福官銜改舊銜。名自石渠書典籍，香從芸閣著衣衫。寰中不用憂天旱，霖雨看看屬傅巖。',\n",
       " ' 松店茅軒向水開，東頭舍賃一裴徊。窗吟苦爲秋江靜，枕夢驚因曉角催。鄰舍見愁賒酒與，主人知去索錢來。眼看白筆爲霖雨，肯使紅鱗便曝腮。',\n",
       " ' 曉擎弓箭入初場，一發曾穿百步楊。仙籍舊題前進士，聖朝新奏校書郎。馬疑金馬門前馬，香認芸香閣上香。閑伴李膺紅燭下，慢吟絲竹淺飛觴。',\n",
       " ' 東南一境清心目，有此千峰插翠微。人在下方衝月上，鶴從高處破煙飛。巖深水落寒侵骨，門靜花開色照衣。欲識蓬萊今便是，更於何處學忘機。',\n",
       " ' 受降城必破，回落隴頭移。蕃道北海北，謀生今始知。',\n",
       " ' 一陣風來一陣砂，有人行處沒人家。黃河九曲冰先合，紫塞三春不見花。',\n",
       " ' 石國胡兒向磧東，愛吹橫笛引秋風。夜來雲雨皆飛盡，月照平沙萬里空。',\n",
       " ' 生在巫山更向西，不知何事到巴溪。中宵爲憶秋雲伴，遙隔朱門向月啼。',\n",
       " ' 桃花春色暖先開，明媚誰人不看來。可惜狂風吹落後，殷紅片片點莓苔。',\n",
       " ' 薛老峰頭三箇字，須知此與石齊生。直叫截斷蒼苔色，浮世人儕眼始明。',\n",
       " ' 羣玉詩名冠李唐，投詩換得校書郎。吟魂醉魄知何處，空有幽蘭隔岸香。',\n",
       " ' 建造上方藤影裏，高僧往往似天台。不知名樹簷前長，曾問道人巖下來。',\n",
       " ' 古陵寒雨集，高鳥夕陽明。高情千里外，長嘯一聲初。月離山一丈，風吹花數苞。曉來山鳥鬧，雨過杏花稀。曲渚回灣鎖釣舟，平潮晚影沈清底。遠岳危欄等翠尖。白日纔離滄海底，清光先照戶窗前。連雲天塹有山色，極目海門無鴈行。可憐黃雀銜將去，從此莊周夢不成。禪是大溈詩是朴，大唐天子只三人。',\n",
       " ' 禾黍不陽豔，競栽桃李春。翻令力耕者，半作賣花人。',\n",
       " ' 湘水似伊水，湘人非故人。登臨獨無語，風柳自搖春。',\n",
       " ' 曉陌攜籠去，桑林路隔淮。何如鬬百草，賭取鳳皇釵。',\n",
       " ' 落第春相困，無心惜落花。荆山歸不得，歸得亦無家。',\n",
       " ' 松格一何高，何人號乳毛。霜天寓直夜，媿爾伴閑曹。',\n",
       " ' 賢人骨已銷，墓樹幾榮凋。正直魂如在，齋心願一招。',\n",
       " ' 亂前看不足，亂後眼偏明。却得蓬蒿力，遮藏見太平。',\n",
       " ' 唐昌樹已荒，天意眷文昌。曉入微風起，春時雪滿牆。',\n",
       " ' 暴亂免遺折，森羅賢達名。末郎何所取，叨繼外門榮。',\n",
       " ' 所立共寒苦，平生同與遊。相看臨遠水，獨自上孤舟。天澹滄浪晚，風悲蘭杜秋。前程吟此景，爲子上高樓。',\n",
       " ' 灞岸草萋萋，離觴我獨攜。流年俱老大，失意又東西。曉楚山雲滿，春吳水樹低。到家梅雨歇，猶有子規啼。',\n",
       " ' 華省稱前任，何慙削一麾。滄洲失孤壘，白髮出重圍。苦節翻多難，空山自喜歸。悠悠清漢上，漁者日相依。',\n",
       " ' 青衿離白社，朱綬始言歸。此去應多羨，初心盡不違。江帆和日落，越鳥近鄉飛。一路春風裏，楊花雪滿衣。',\n",
       " ' 爲儒欣出守，上路亦戎裝。舊製詩多諷，分憂俗必康。開懷江稻熟，寄信露橙香。郡閣清吟夜，寒星識望郎。',\n",
       " ' 泗上未休兵，壺關事可驚。流年催我老，遠道念君行。殘雪臨晴水，寒梅發故城。何當食新稻，歲稔又時平。',\n",
       " ' 直應歸諫署，方肯別山村。勤苦常同業，孤單共感恩。醉披仙鶴氅，吟扣野僧門。夢見君高趣，天涼自灌園。',\n",
       " ' 祕閣鎖書深，牆南列晚岑。吏人同野鹿，庭木似山林。淺井寒蕪入，迴廊疊蘚侵。閑看薛稷鶴，共起五湖心。',\n",
       " ' 平楚干戈後，田園失耦耕。艱難登一第，離亂省諸兄。樹沒春江漲，人繁野渡晴。閑來思學館，猶夢雪窗明。',\n",
       " ' 不歸何慰親，歸去舊風塵。灑淚慙關吏，無言對越人。遠帆花月夜，微岸水天春。莫便隨漁釣，平生已苦辛。',\n",
       " ' 春亦怯邊遊，此行風正秋。別離逢雨夜，道路向雲州。磧樹藏城近，沙河漾日流。將軍方破虜，莫惜獻良籌。',\n",
       " ' 澤國尋知己，南浮不偶遊。湓城分楚塞，廬岳對江州。曉飯臨孤嶼，春帆入亂流。雙旌相望處，月白庾公樓。',\n",
       " ' 白頭新作尉，縣在故山中。高第能卑宦，前賢尚此風。蕪湖春蕩漾，梅雨晝溟濛。佐理人安後，篇章莫廢功。',\n",
       " ' 如何拋錦帳，蓮府對蓮峰。舊有雲霞約，暫留鵷鷺蹤。敷溪秋雪岸，樹谷夕陽鐘。盡入新吟境，歸朝興莫慵。',\n",
       " ' 解印東歸去，人情此際多。名高五七字，道勝兩重科。宿館明寒燒，吟船兀夜波。家山春更好，越鳥在庭柯。',\n",
       " ' 南遊曾共遊，相別倍相留。行色迴燈曉，離聲滿竹秋。穩眠彭蠡浪，好醉岳陽樓。明日逢佳景，爲君成白頭。',\n",
       " ' 淒涼懷古意，湘浦弔靈均。故國經新歲，扁舟寄病身。山城多曉瘴，澤國少晴春。漸遠無相識，青梅獨向人。',\n",
       " ' 驚秋思浩然，信美向巴天。獨倚臨江樹，初聞落日蟬。哀榮悲往事，漂泊念多年。未便甘休去，吾宗盡見憐。',\n",
       " ' 平昔偏知我，司勳張外郎。昨來聞俶擾，憂甚欲顛狂。煙暝搔愁鬢，春陰賴酒鄉。江樓倚不得，橫笛數聲長。',\n",
       " ' 男兒懷壯節，何不事嫖姚？高疊觀諸寨，全師護大朝。淺山寒放馬，亂火夜防苗。下第春愁甚，勞君遠見招。',\n",
       " ' 風神何蘊藉，張緒正當年。端簡爐香裏，濡毫洞案邊。飾裝無雨備，著述減春眠。旦夕應彌入，銀臺曉候宣。',\n",
       " ' 王畿第一縣，縣尉是詞人。館殿非初意，圖書是舊貧。斫冰泉竇響，賽雪廟松春。自此昇通籍，清華日近身。',\n",
       " ' 悠悠干祿利，草草廢漁樵。身世堪惆悵，風騷頗寂寥。高秋期野步，積雨放趨朝。得句如相憶，莎齋且見招。',\n",
       " ' 天階讓紫衣，冷格鶴猶卑。道勝嫌名出，身閑覺老遲。晚香延宿火，寒磬度高枝。長說長松寺，他年與我期。',\n",
       " ' 山雪照湖水，漾舟湖畔歸。松篁調遠籟，臺榭發清輝。野岫分閑徑，漁家並掩扉。暮年詩力在，新句更幽微。',\n",
       " ' 顧渚山邊郡，溪將罨畫通。遠看城郭裏，全在水雲中。西閣歸何晚，東吳興未窮。茶香紫筍露，洲迥白蘋風。歌緩眉低翠，杯明蠟翦紅。政成尋往事，輟棹問漁翁。',\n",
       " ' 枯桑河上村，寥落舊田園。少小曾來此，悲涼不可言。訪鄰多指塚，問路半移原。久歉家僮散，初晴野薺繁。客帆懸極浦，漁網曬危軒。苦澀詩盈篋，荒唐酒滿尊。高枝霜果在，幽渚暝禽喧。遠靄籠樵響，微煙起燒痕。哀榮孤族分，感激外兄恩。三宿忘歸去，圭峰恰對門。',\n",
       " ' 寒極放朝天，欣聞半夜宣。時安逢密雪，日晏得高眠。擁褐同休假，吟詩賀有年。坐來幽興在，松亞小窗前。',\n",
       " ' 小諫昇中諫，三年侍玉除。且言無所補，浩歎欲何如。宮闕飛灰燼，嬪嬙落里閭。藍峰秋更碧，霑灑望鑾輿。',\n",
       " ' 老作含香客，貧無僦舍錢。神州容寄跡，大尹是同年。密邇都忘倦，乖慵益見憐。雪風花月好，中夜便招延。',\n",
       " ' 荆州未解圍，小縣結茅茨。強對官人笑，甘爲野鶴欺。江春鋪網闊，市晚鬻蔬遲。子美猶如此，翻然不敢悲。',\n",
       " ' 傳聞殊不定，鑾輅幾時還。俗易無常性，江清見老顏。夜船歸草市，春步上茶山。寨將來相問，兒童競啓關。',\n",
       " ' 猶子在天末，念渠懷渭陽。巴山偶會遇，江浦共悲涼。謫宦君何遠，窮遊我自強。瘴村三月暮，雨熟野梅黃。',\n",
       " ' 多病久離索，相尋聊解顏。短牆通御水，疎樹出南山。歲月何難老，園林未得還。無門共榮達，孤坐却如閑。',\n",
       " ' 平生苦節同，旦夕會原東。掩卷斜陽裏，看山落木中。星霜今欲老，江海業全空。近日文場內，因君起古風。',\n",
       " ' 多才翻得罪，天末抱窮憂。白首爲遷客，青山繞萬州。醉敧梅障曉，歌厭竹枝秋。望闕懷鄉淚，荆江水共流。',\n",
       " ' 簪豸年何久，懸帆興甚長。江流愛吳越，詩格愈齊梁。竹寺晴吟遠，蘭洲晚泊香。高閑徒自任，華省待爲郎。',\n",
       " ' 鄠郊陪野步，早歲偶因詩。自後吟新句，長愁減舊知。靜燈微落燼，寒硯旋生澌。夜夜冥搜苦，那能鬢不衰。',\n",
       " ' 謝病別文昌，仙舟向越鄉。貴爲金馬客，雅稱水曹郎。白鷺同孤潔，清波共渺茫。相如詞賦外，騷雅趣何長。',\n",
       " ' 松窗楸局穩，相顧思皆凝。幾局賭山果，一先饒海僧。覆圖聞夜雨，下子對秋燈。何日無羈束，期君向杜陵。',\n",
       " ' 桐廬歸舊廬，垂老復樵漁。吾子雖言命，鄉人嬾讀書。煙舟撐晚浦，雨屐翦春蔬。異代名方振，哀吟莫廢初。',\n",
       " ' 萬里念江海，浩然天地秋。風高羣木落，夜久數星流。鐘絕分宮漏，螢微隔御溝。遙思洞庭上，葦露滴漁舟。',\n",
       " ' 知己竟何人，哀君尚苦辛。圖書長在手，文學老於身。公道天難廢，貞姿世任嗔。小齋松菊靜，願卜子爲鄰。',\n",
       " ' 夫君清且貧，琴鶴最相親。簡肅諸曹事，安閑一境人。陵山雲裏拜，渠路雨中巡。易得連宵醉，千缸石凍春。',\n",
       " ' 相尋喜可知，放錫便論詩。酷愛山兼水，唯應我與師。風雷吟不覺，猨鶴老爲期。近輩推棲白，其如趣向卑。',\n",
       " ' 歲晏樂園林，維摩契道心。江雲寒不散，庭雪夜方深。酒勸漁人飲，詩憐稚子吟。四郊多壘日，勉我捨朝簪。',\n",
       " ' 相庭留不得，江野有苔磯。兩浙尋山徧，孤舟載鶴歸。世間書讀盡，雲外客來稀。諫署搜賢急，應難惜布衣。',\n",
       " ' 令終歸故里，末歲道如初。舊友誰爲誌，清風豈易書。雨墳生野蕨，鄉奠釣江魚。獨夜吟還泣，前年伴直廬。',\n",
       " ' 所惜絕吟聲，不悲君不榮。李端終薄宦，賈島得高名。旅葬新墳小，遺孤遠俗輕。猶疑隨計晚，昨夜草蟲鳴。',\n",
       " ' 自聞東蜀病，唯我獨關情。若近長江死，想君勝在生。瘴蒸丹旐溼，燈隔素帷清。塚樹僧栽後，新蟬一兩聲。',\n",
       " ' 末路思前侶，猶爲戀故巢。江山多勝境，賓主是貧交。飲舫閑依葦，琴堂雅結茅。夜清僧伴宿，水月在松梢。',\n",
       " ' 天末去程孤，沿淮復向吳。亂離何處甚，安穩到家無。樹盡雲垂野，檣稀月滿湖。傷心繞村落，應少舊耕夫。',\n",
       " ' 豈易訪仙蹤，雲蘿千萬重。他年來卜隱，此景願相容。亂水林中路，深山雪裏鐘。見君琴酒樂，迴首興何慵。',\n",
       " ' 尋豔復尋香，似閑還似忙。暖煙沈蕙徑，微雨宿花房。書幌輕隨夢，歌樓誤採粧。王孫深屬意，繡入舞衣裳。',\n",
       " ' 苦辛垂二紀，擢第却霑裳。春榜到春晚，一家榮一鄉。題名登塔喜，醵宴爲花忙。好是東歸日，高槐蕊半黃。',\n",
       " ' 南連乳郡流，闊碧侵晴樓。徹底千峰影，無風一片秋。垂楊拂蓮葉，返照媚漁舟。鑑貌還惆悵，難遮兩鬢羞。',\n",
       " ' 流落復蹉跎，交親半逝波。謀生非不切，言命欲如何。故楚春田廢，窮巴瘴雨多。引人鄉淚盡，夜夜竹枝歌。',\n",
       " ' 漠漠江天外，登臨返照間。潮來無別浦，木落見他山。沙鳥晴飛遠，漁人夜唱閑。歲窮歸未得，心逐片帆還。',\n",
       " ' 細草岸西東，酒旗遙水風。樓臺在煙杪，鷗鷺下沙中。翠幄晴相接，芳洲夜暫空。何人賞秋景，興與此時同。',\n",
       " ' 茫茫信馬行，不似近都城。苑吏猶迷路，江人莫問程。聚來千嶂出，落去一川平。日暮客心速，愁聞鴈數聲。',\n",
       " ' 奔走失前計，淹留非本心。已難消永夜，況復聽秋霖。漸解巴兒語，誰憐越客吟。黃花徒滿手，白髮不勝簪。',\n",
       " ' 白道曉霜迷，離燈照馬嘶。秋風滿關樹，殘月隔河雞。來往非無倦，窮通豈易齊。何年歸故社，披雨翦春畦。',\n",
       " ' 步步景通真，門前衆水分。檉蘿諸洞合，鐘磬上清聞。古木千尋雪，寒山萬丈雲。終期掃壇級，來事紫陽君。',\n",
       " ' 客來風雨後，院靜似荒涼。罷講蛩離砌，思山葉滿廊。臘高興故疾，爐暖發餘香。自說匡廬側，杉陰半石牀。',\n",
       " ' 野色入前軒，翛然琴與尊。畫僧依寺壁，栽葦學江村。自醞花前酒，誰敲雪裏門。不辭朝謁遠，唯要近慈恩。',\n",
       " ' 巡禮諸方徧，湘南頗有緣。焚香老山寺，乞食向江船。紗碧籠名畫，燈寒照淨禪。我來能永日，蓮漏滴堦前。',\n",
       " ' 池榭愜幽獨，狂吟學解嘲。露荷香自在，風竹冷相敲。喪志嫌孤宦，忘機愛澹交。仙山如有分，必擬訪三茅。',\n",
       " ' 韋杜八九月，亭臺高下風。獨來新霽後，閑步澹煙中。荷密連池綠，柿繁和葉紅。主人貪貴達，清境屬鄰翁。',\n",
       " ' 漂泊病難任，逢人淚滿襟。關東多事日，天末未歸心。夜雨荆江漲，春雲郢樹深。殷勤聽漁唱，漸次入吳音。',\n",
       " ' 江清如洛汭，寺好似香山。勞倦孤舟裏，登臨半日間。樹涼巢鶴健，巖響語僧閑。更共幽雲約，秋隨絳帳還。',\n",
       " ' 日日狎沙禽，偷安且放吟。讀書老不入，愛酒病還深。歉後爲羈客，兵餘問故林。楊花滿牀席，搔首度春陰。',\n",
       " ' 縣幽公事稀，庭草是山薇。足得招棊侶，何妨著道衣。野泉當案落，汀鷺入衙飛。寺去東林近，多應隔宿歸。',\n",
       " ' 江城無宿雪，風物易爲春。酒美消磨日，梅香著莫人。老吟窮景象，多難損精神。漸有還京望，綿州減戰塵。',\n",
       " ' 咸陽城下宿，往事可悲思。未有謀身計，頻遷反正期。凍河孤棹澀，老樹疊巢危。莫問今行止，漂漂不自知。',\n",
       " ' 徒勞悲喪亂，自古戒繁華。落日狐兔徑，近年公相家。可悲聞玉笛，不見走香車。寂寞牆匡裏，春陰挫杏花。',\n",
       " ' 誰無泉石趣，朝下少同過。貪勝覺程近，愛閑經宿多。片沙留白鳥，高木引青蘿。醉把漁竿去，殷勤藉岸莎。',\n",
       " ' 縣官清且儉，深谷有人家。一徑入寒竹，小橋穿野花。碓喧春澗滿，梯倚綠桑斜。自說年來稔，前村酒可賒。',\n",
       " ' 吾道有誰同，深居自固窮。殷勤謝綠樹，朝夕惠清風。書滿閑窗下，琴橫野艇中。年來頭更白，雅稱釣魚翁。',\n",
       " ' 葉葉下高梧，端居失所圖。亂離時輩少，風月夜吟孤。舊疾衰還有，窮愁醉暫無。秋光如水國，不語理霜鬚。',\n",
       " ' 相近復相尋，山僧與水禽。煙蓑春釣靜，雪屋夜棊深。雅道誰開口，時風未醒心。溪光何以報，秪有醉和吟。',\n",
       " ' 蓼水菊籬邊，新晴有亂蟬。秋光終寂寞，晚醉自留連。野溼禾中露，村閑社後天。題詩滿紅葉，何必浣花牋。',\n",
       " ' 村落清明近，鞦韆稚女誇。春陰妨柳絮，月黑見棃花。白鳥窺魚網，青帘認酒家。幽棲雖自適，交友在京華。',\n",
       " ' 不學梅欺雪，輕紅照碧池。小桃新謝後，雙燕却來時。香屬燈龍客，煙籠宿蝶枝。臨軒須貌取，風雨易離披。',\n",
       " ' 一露一朝新，簾櫳曉景分。豔和蜂蝶動，香帶管弦聞。笑擬春無力，粧濃酒漸醺。直疑風起夜，飛去替行雲。',\n",
       " ' 蔟蔟復悠悠，年年拂漫流。差池伴黃菊，冷澹過清秋。晚帶鳴蟲急，寒藏宿鷺愁。故溪歸不得，憑仗繫漁舟。',\n",
       " ' 江梅且緩飛，前輩有歌詞。莫惜黃金縷，難忘白雪枝。吟看歸不得，醉嗅立如癡。和雨和煙折，含情寄所思。',\n",
       " ' 平昔誰相愛，驪山遇貴妃。枉教生處遠，愁見摘來稀。晚奪紅霞色，晴欺瘴日威。南荒何所戀，爲爾即忘歸。',\n",
       " ' 北渚牽吟興，西溪爽共遊。指期乘禁馬，無暇狎沙鷗。縱目懷青島，澄心想碧流。明公非不愛，應待泛龍舟。',\n",
       " ' 每思聞淨話，雨夜對禪牀。未得重相見，秋燈照影堂。孤雲終負約，薄宦轉堪傷。夢繞長松塔，遙焚一炷香。',\n",
       " ' 何以保孤危，操修自不知。衆中常杜口，夢裏亦吟詩。失計辭山早，非才得仕遲。薄冰安可履，暗室豈能欺。勤苦流螢信，吁嗟宿燕知。殘鐘殘漏曉，落葉落花時。故舊寒門少，文章外族衰。此生多轗軻，半世足漂離。省署隨清品，漁舟爽素期。戀恩休未遂，雙鬢漸成絲。',\n",
       " ' 雪初開一徑，師忽扣雙扉。老大情相近，林泉約共歸。憂榮棲省署，孤僻謝朝衣。他夜松堂宿，論詩更入微。',\n",
       " ' 夕陽秋更好，斂斂蕙蘭中。極浦明殘雨，長天急遠鴻。僧窗留半榻，漁舸透疎篷。莫恨清光盡，寒蟾即照空。',\n",
       " ' 夜來搖落悲，桑棗半空枝。故國無消息，流年有亂離。霜秦聞雁早，煙渭認帆遲。日暮寒鼙急，邊軍在雍岐。',\n",
       " ' 松因溪得名，溪吹荅松聲。繚繞能穿寺，幽奇不在城。寒煙齋後散，春雨夜中平。染岸蒼苔古，翹沙白鳥明。澄分僧影瘦，光徹客心清。帶梵侵雲響，和鐘擊石鳴。澹烹新茗爽，暖泛落花輕。此景吟難盡，憑君畫入京。',\n",
       " ' 離夜聞橫笛，可堪吹鷓鴣。雪冤知早晚，雨泣渡江湖。秋樹吹黃葉，臘煙垂綠蕪。虞飜歸有日，莫便哭窮途。',\n",
       " ' 無著復無求，平生不解愁。鬻蔬貧潔淨，中酒病風流。旨趣陶山相，詩篇沈隱侯。小齋江色裏，籬柱繫漁舟。',\n",
       " ' 贊善賢相後，家藏名畫多。留心於繪素，得事在煙波。屬興同吟詠，成功更琢磨。愛予風雪句，幽絕寫漁蓑。',\n",
       " ' 榮落何相似，初終却一般。猶疑和夕照，誰信墮朝寒。水木輝華別，詩家比象難。佳人應誤拜，棲鳥反求安。屈指期輪滿，何心謂影殘。庾樓清賞處，吟徹曙鐘看。',\n",
       " ' 園林青氣動，衆木散寒聲。敗葉牆陰在，滋條雪後榮。欣欣春令早，藹藹日華輕。庾嶺梅先覺，隋堤柳暗驚。山川應物候，臯壤起農情。秪待花開日，連棲出谷鶯。',\n",
       " ' 節應清和候，郊宮事潔羞。至誠聞上帝，明德祀圓丘。雅用陶匏器，馨非黍稷流。就陽陳盛禮，匡國禱鴻休。漸曉蘭迎露，微涼麥弄秋。壽山橫紫閣，瑞靄抱皇州。外肅通班序，中嚴錫慶優。奏歌三酒備，表敬百神柔。池碧將還鳳，原清再問牛。萬方瞻輔翼，共賀贊皇猷。',\n",
       " ' 昔歲曾投贄，關河在左馮。庾公垂顧遇，王粲許從容。首薦叨殊禮，全家寓近封。白樓陪寫望，青眼感遭逢。顧念梁間燕，深憐澗底松。嵐光蓮嶽逼，酒味菊花濃。寇難旋移國，漂離幾聽蛩。半生悲逆旅，二紀間門墉。蜀雪隨僧蹋，荆煙逐雁衝。凋零歸兩鬢，舉止失前蹤。得事雖甘晚，陳詩未肯慵。邇來趨九仞，又伴賞三峯。棲託情何限，吹噓意數重。自茲儔侶內，無復歎龍鍾。',\n",
       " ' 迂疎雖可欺，心路甚男兒。薄宦渾無味，平生粗有詩。澹交終不破，孤達晚相宜。直夜花前喚，朝寒雪裏追。竹聲輸我聽，茶格共僧知。景物還多感，情懷偶不卑。溪鶯喧午寢，山蕨止春飢。險事銷腸酒，清歡敵手棋。香鋤拋藥圃，煙艇憶莎陂。自許亨途在，儒綱復振時。',\n",
       " ' 王澤尚通津，恩波此日新。深疑一夜雨，宛似五湖春。泛灩翹振鷺，澄清躍紫鱗。翠低孤嶼柳，香失半汀蘋。鳳輦尋佳境，龍舟命近臣。桂花如入手，願作從遊人。',\n",
       " ' 峭仞聳巍巍，晴嵐染近畿。孤高不可狀，圖寫盡應非。絕頂神仙會，半空鸞鶴歸。雲臺分遠靄，樹谷隱斜暉。墜石連村響，狂雷發廟威。氣中寒渭闊，影外白樓微。雲對蓮花落，泉橫露掌飛。乳懸危磴滑，樵徹上方稀。澹泊生真趣，逍遙息世機。野花明澗路，春蘚澀松圍。遠洞時聞磬，羣僧晝掩扉。他年洗塵骨，香火願相依。',\n",
       " ' 祕殿臨軒日，和鑾返正年。兩班文武盛，百辟羽儀全。霜漏清中禁，風旗拂曙天。門嚴新勘契，仗入乍承宣。玉几當紅旭，金鑪縱碧煙。對揚稱法吏，贊引出宮鈿。言動揮毫疾，雍容執簿專。壽山晴靉靆，顥氣暖連延。禮有鴛鸞集，恩無雨露偏。小臣叨備位，歌詠泰階前。',\n",
       " ' 風騷爲主人，凡俗仰清塵。密行稱閨閫，明誠動搢紳。周旋居顯重，內外掌絲綸。妙主蓬壺籍，忠爲社稷臣。大儀牆仞峻，東轄紀綱新。聞善常開口，推公豈爲身。立朝鳴珮重，歸宅典衣貧。半醉看花晚，中餐煮菜春。晴臺隨鹿上，幽墅結僧鄰。理論知清越，生徒得李頻。藥香沾筆硯，竹色染衣巾。寄鶴眠雲叟，騎驢入室賓。近將姚監比，僻與段卿親。葉積池邊路，茶遲雪後薪。所難留著述，誰不秉陶鈞。喪亂時多變，追思事已陳。浮華重發作，雅正甚湮淪。宗從今何在，依棲素有因。七松無影響，雙淚益悲辛。猶喜于門秀，年來屈復伸。',\n",
       " ' 高名向已求，古韻古無儔。風月拋蘭省，江山復桂州。賢人知止足，中歲便歸休。雲鶴深相待，公卿不易留。滿朝張祖席，半路上仙舟。篋重藏吳畫，茶新換越甌。郡迎紅燭宴，寺宿翠嵐樓。觸目成幽興，全家是勝遊。篷聲漁叟雨，葦色鷺鷥秋。久別郊園改，將歸里巷修。桑麻勝祿食，節序免鄉愁。陽朔花迎櫂，崇賢葉滿溝。席春歡促膝，簷日暖梳頭。道暢應爲蝶，時來必問牛。終須康庶品，未爽漱寒流。議在歸羣望，情難戀自由。小生誠淺拙，早歲便依投。夏課每垂獎，雪天常見憂。遠招陪宿直，首薦向公侯。攀送偏揮灑，龍鍾志未酬。',\n",
       " ' 妖星沈雨露，和氣滿京關。上將忠勳立，明君法駕還。順風調雅樂，夾道序羣班。香泛傳宣裏，塵清指顧間。樓臺新紫氣，雲物舊黃山。曉渭行朝肅，秋郊曠望閑。廟靈安國步，日角動天顏。浩浩昇平曲，流歌徹百蠻。',\n",
       " ' 萬重煙靄裏，隱隱見夔州。夜靜明月峽，春寒堆雪樓。獨吟誰會解，多病自淹留。往事如今日，聊同子美愁。',\n",
       " ' 展轉攲孤枕，風幃信寂寥。漲江垂螮蝀，驟雨鬧芭蕉。道阻歸期晚，年加記性銷。故人衰颯盡，相望在行朝。',\n",
       " ' 沙鳥與山麋，由來性不羈。可憑唯在道，難解莫過詩。任笑孤吟僻，終嫌巧宦卑。秉慵恩地恕，冷澹好僧知。華省慙公器，滄江負釣師。露花春直夜，煙鼓早朝時。世路多艱梗，家風免墜遺。殷勤一蓑雨，秪得夢中披。',\n",
       " ' 奔避投人遠，漂離易感恩。愁髯霜颯颯，病眼淚昏昏。孤館秋聲樹，寒江落照村。更聞歸路絕，新寨截荆門。',\n",
       " ' 八韻與五字，俱爲時所先。幽魂應自慰，李白墓相連。',\n",
       " ' 塵壓鴛鴦廢錦機，滿頭空插麗春枝。東鄰舞妓多金翠，笑翦燈花學畫眉。',\n",
       " ' 花月樓臺近九衢，清歌一曲倒金壺。座中亦有江南客，莫向春風唱鷓鴣。',\n",
       " ' 王孫莫把比荆蒿，九日枝枝近鬢毛。露溼秋香滿池岸，由來不羨瓦松高。',\n",
       " ' 憶子啼猨繞樹哀，雨隨孤櫂過陽臺。波頭未白人頭白，瞥見春風灩澦堆。',\n",
       " ' 何遜空堦夜雨平，朝來交直雨新晴。落花亂上花塼上，不忍和苔蹋紫英。',\n",
       " ' 御溝春水繞閑坊，信馬歸來傍短牆。幽榭名園臨紫陌，晚風時帶牡丹香。',\n",
       " ' 節去蜂愁蝶不知，曉庭還繞折殘枝。自緣今日人心別，未必秋香一夜衰。',\n",
       " ' 閑立春塘煙澹澹，靜眠寒葦雨颼颼。漁翁歸後汀沙晚，飛下灘頭更自由。',\n",
       " ' 半煙半雨江橋畔，暎杏映桃山路中。會得離人無限意，千絲萬絮惹春風。',\n",
       " ' 年來還未上丹梯，且著漁蓑謝故溪。落盡梨花春又了，破籬殘雨晚鶯啼。',\n",
       " ' 未嘗青杏出長安，豪士應疑怕牡丹。秪有退耕耕不得，茫然村落水吹殘。',\n",
       " ' 塞曲淒清楚水濱，聲聲吹出落梅春。須知風月千檣下，亦有葫蘆河畔人。',\n",
       " ' 舉世何人肯自知，須逢精鑑定妍媸。若教嫫母臨明鏡，也道不勞紅粉施。',\n",
       " ' 花落江堤蔟暖煙，雨餘草色遠相連。香輪莫輾青青破，留與愁人一醉眠。',\n",
       " ' 亂飄僧舍茶煙溼，密灑歌樓酒力微。江上晚來堪畫處，漁人披得一蓑歸。',\n",
       " ' 雖近曲江居古寺，舊山終憶九華峯。春來老病厭迎送，翦却牡丹栽野松。',\n",
       " ' 水天春暗暮寒濃，船閉篷窗細雨中。閑道漁家酒初熟，夜來翻喜打頭風。',\n",
       " ' 揚子江頭楊柳春，楊花愁殺渡江人。數聲風笛離亭晚，君向瀟湘我向秦。',\n",
       " ' 松溪水色綠於松，每到松溪到暮鐘。閑得心源秪如此，問禪何必向雙峯。',\n",
       " ' 舊遊前事半埃塵，多向林中結淨因。一念一爐香火裏，後身唯願似師身。',\n",
       " ' 白頭波上白頭翁，家逐船移浦浦風。一尺鱸魚新釣得，兒孫吹火荻花中。',\n",
       " ' 向蜀還秦計未成，寒蛩一夜繞牀鳴。愁眠不穩孤燈盡，坐聽嘉陵江水聲。',\n",
       " ' 寒寺唯應我訪師，人稀境靜雪銷遲。竹西落照侵窗好，堪惜歸時落照時。',\n",
       " ' 小巧功成雨蘚斑，軒車日日扣松關。峨嵋咫尺無人去，却向僧窗看假山。',\n",
       " ' 聽經看畫繞虛廊，風拂金鑪待賜香。丞相未來春雪密，暫偷閑臥老僧牀。',\n",
       " ' 湛湛清江疊疊山，白雲白鳥在其間。漁翁醉睡又醒睡，誰道皇天最惜閑。',\n",
       " ' 莫厭九衢塵土間，秋晴滿眼是南山。僧家未必全無事，道著訪僧心且閑。',\n",
       " ' 初塵芸閣辭禪閣，却訪支郎是老郎。我趣轉卑師趣靜，數峯秋雪一鑪香。',\n",
       " ' 松上閑雲石上苔，自嫌歸去夕陽催。山門握手無他語，秪約今冬看雪來。',\n",
       " ' 故國無心渡海潮，老禪方丈倚中條。夜深雨絕松堂靜，一點山螢照寂寥。',\n",
       " ' 危根瘦盡聳孤峯，珍重江僧好筆蹤。得向遊人多處畫，却勝澗底作真松。',\n",
       " ' 張生故國三千里，知者唯應杜紫微。君有君恩秋後葉，可能更羨謝玄暉。',\n",
       " ' 淚溼孤鸞曉鏡昏，近來方解惜青春。杏花楊柳年年好，不忍迴看舊寫真。',\n",
       " ' 背霜南雁不到處，倚櫂北人初聽時。梅雨滿江春草歇，一聲聲在荔枝枝。',\n",
       " ' 春雲薄薄日輝輝，宮樹煙深隔水飛。應爲能歌繫仙籍，麻姑乞與女真衣。',\n",
       " ' 野格由來倦小池，驚飛却下碧江涯。月昏風急何處宿，秋岸蕭蕭黃葦枝。',\n",
       " ' 春紅秋紫繞池臺，箇箇圓如濟世財。雨後無端滿窮巷，買花不得買愁來。',\n",
       " ' 移舟水濺差差綠，倚檻風搖柄柄香。多謝浣溪人不折，雨中留得蓋鴛鴦。',\n",
       " ' 濃澹芳春滿蜀鄉，半隨風雨斷鶯腸。浣花溪上堪惆悵，子美無心爲發揚。',\n",
       " ' 砌下芝蘭新滿徑，門前桃李舊垂陰。却應迴念江邊草，放出春煙一寸心。',\n",
       " ' 玉階春冷未催班，暫拂塵衣就笏眠。孤立小心還自笑，夢魂潛繞御鑪煙。',\n",
       " ' 紫雲重疊抱春城，廊下人稀唱漏聲。偷得微吟斜倚柱，滿衣花露聽宮鶯。',\n",
       " ' 吾君英睿相君賢，其那寰區未晏然。明日翠華春殿下，不知何語可聞天。',\n",
       " ' 平蕪漠漠失樓臺，昔日遊人亂後來。寥落牆匡春欲暮，燒殘宮樹有花開。',\n",
       " ' 見君失意我惆悵，記得當年落第情。出去無憀歸又悶，花南慢打講鐘聲。',\n",
       " ' 推琴當酒度春陰，不解謀生秪解吟。舞蝶歌鶯莫相試，老郎心是老僧心。',\n",
       " ' 人間疎散更無人，浪兀孤舟酒兀身。蘆筍鱸魚拋不得，五陵珍重五湖春。',\n",
       " ' 秋光不見舊亭臺，四顧荒涼瓦礫堆。火力不能銷地力，亂前黃菊眼前開。',\n",
       " ' 上國休誇紅杏𦫢，深溪自照綠苔磯。一枝低帶流鶯睡，數片狂和舞蝶飛。堪恨路長移不得，可無人與畫將歸。手中已有新春桂，多謝煙香更入衣。',\n",
       " ' 盧郎到處覺風生，蜀郡留連亞相情。亂後江山悲庾信，夜來煙月屬袁宏。夢歸蘭省寒星動，吟向莎洲宿鷺驚。未脫白衣頭半白，叨陪屬和倍爲榮。',\n",
       " ' 入門長恐先師在，香印紗燈似昔年。澗路縈迴齋處遠，松堂虛豁講聲圓。頃爲弟子曾同社，今忝星郎更契緣。顧渚一甌春有味，中林話舊亦潸然。',\n",
       " ' 何事文星與酒星，一時鍾在李先生。高吟大醉三千首，留著人間伴月明。',\n",
       " ' 一卷疎蕪一百篇，名成未敢暫忘筌。何如海日生殘夜，一句能令萬古傳。',\n",
       " ' 七歲侍行湖外去，岳陽樓上敢題詩。如今寒晚無功業，何以勝任國士知。',\n",
       " ' 一第由來是出身，垂名俱爲國風陳。此生若不知騷雅，孤宦如何作近臣。',\n",
       " ' 殷璠裁鑒英靈集，頗覺同才得旨深。何事後來高仲武，品題間氣未公心。',\n",
       " ' 風騷如線不勝悲，國步多艱即此時。愛日滿堦看古集，秪應陶集是吾師。',\n",
       " ' 鄉人來話亂離情，淚滴殘陽問紫荆。白社已應無故老，清江依舊繞空城。高秋軍旅齊山樹，昔日漁家是野營。牢落故居灰燼後，黃花紫蔓上牆生。',\n",
       " ' 暖戲煙蕪錦翼齊，品流應得近山雞。雨昏青草湖邊過，花落黃陵廟裏啼。遊子乍聞征袖溼，佳人纔唱翠眉低。相呼相應湘江闊，苦竹叢深春日西。',\n",
       " ' 年去年來來去忙，春寒煙暝渡瀟湘。低飛綠岸和梅雨，亂入紅樓揀杏梁。閑几硯中窺水淺，落花徑裏得泥香。千言萬語無人會，又逐流鶯過短牆。',\n",
       " ' 江天梅雨溼江蘺，到處煙香是此時。苦竹嶺無歸去日，海棠花落舊棲枝。春宵思極蘭燈暗，曉月啼多錦幕垂。唯有佳人憶南國，殷勤爲爾唱愁詞。',\n",
       " ' 八月悲風九月霜，蓼花紅澹葦條黃。石頭城下波搖影，星子灣西雲間行。驚散漁家吹短笛，失羣征戍鎖殘陽。故鄉聞爾亦惆悵，何況扁舟非故鄉。',\n",
       " ' 竹院松廊分數派，不空清泚亦逶迤。落花相逐去何處，幽鷺獨來無限時。洗鉢老僧臨岸久，釣魚閑客捲綸遲。晚晴一片連莎綠，悔與滄浪有舊期。',\n",
       " ' 春風用意勻顏色，銷得攜觴與賦詩。穠麗最宜新著雨，嬌饒全在欲開時。莫愁粉黛臨窗嬾，梁廣丹青點筆遲。朝醉暮吟看不足，羨他蝴蝶宿深枝。',\n",
       " ' 宜煙宜雨又宜風，拂水藏村復間松。移得蕭騷從遠寺，洗來疎淨見前峯。侵堦蘚拆春芽迸，繞徑莎微夏蔭濃。無賴杏花多意緒，數枝穿翠好相容。',\n",
       " ' 二京曾見畫圖中，數本芳菲色不同。孤櫂今來巴徼外，一枝煙雨思無窮。夜郎城近含香瘴，杜宇巢低起暝風。腸斷渝瀘霜霰薄，不教葉似灞陵紅。',\n",
       " ' 布素豪家定不看，若無文彩入時難。紅迷天子帆邊日，紫奪星郎帳外蘭。春水濯來雲雁活，夜機挑處雨燈寒。舞衣轉轉求新樣，不問流離桑柘殘。',\n",
       " ' 文君手裏曙霞生，美號仍聞借蜀城。奪得始知袍更貴，著歸方覺晝偏榮。宮花顏色開時麗，池雁毛衣浴後明。禮部郎官人所重，省中別占好窠名。',\n",
       " ' 仙漏遲遲出建章，宮簾不動透清光。金闈露白新裁詔，畫閤春紅正試妝。淚滴杯盤何所恨，燼飄蘭麝暗和香。多情更有分明處，照得歌塵下燕梁。',\n",
       " ' 雨向莎堦滴未休，冷光孤恨雨悠悠。船中聞雁洞庭宿，牀下有蛩長信秋。背照翠簾新灑別，不挑紅燼正含愁。蕭騷寒竹南窗靜，一局閑棋爲爾留。',\n",
       " ' 公堂瀟灑有林泉，秪隔苔牆是渚田。宗黨相親離亂世，春秋閑論戰爭年。遠江驚鷺來池口，絕頂歸雲過竹邊。風雨夜長同一宿，舊遊多共憶樊川。',\n",
       " ' 退居瀟灑寄禪關，高挂朝簪淨室間。孤島雖留雙鶴歇，五雲爭放二龍閑。輕舟共泛花邊水，野屐同登竹外山。仙署金閨虛位久，夜清應夢近天顏。',\n",
       " ' 紅葉黃花秋景寬，醉吟朝夕在樊川。却嫌今日登山俗，且共高僧對榻眠。別畫長懷吳寺壁，宜茶偏賞霅溪泉。歸來童稚爭相笑，何事無人與酒船。',\n",
       " ' 建章宮殿紫雲飄，春漏遲遲下絳霄。綺陌暖風嘶去馬，粉廊初日照趨朝。花經宿雨香難拾，鶯在豪家語更嬌。秦楚年年有離別，揚鞭揮袖灞陵橋。',\n",
       " ' 習讀在前生，僧談足可明。還家雖解喜，登第未知榮。時果曾霑賜，春闈不挂情。燈前猶惡睡，寤語讀書聲。',\n",
       " ' 江湖猶足事，食宿戍鼙喧。久客秋風起，孤舟夜浪翻。鄉音離楚水，廟貌入湘源。岸闊鳧鷖小，林垂橘柚繁。津官來有意，漁者笑無言。早晚酬僧約，中條有藥園。',\n",
       " ' 萇弘血染新，含露滿江濱。想得尋花徑，應迷拾翠人。窗紗迎擁砌，簪玉妬成茵。天借新晴色，雲饒落日春。嵐光垂處合，眉黛看時嚬。願與仙桃比，無令惹路塵。',\n",
       " ' 杳杳漁舟破暝煙，疎疎蘆葦舊江天。那堪流落逢搖落，可得潸然是偶然。萬頃白波迷宿鷺，一林黃葉送殘蟬。兵車未息年華促，早晚閑吟向滻川。',\n",
       " ' 誰解登高問上玄，謫仙何事謫詩仙。雲遮列宿離華省，樹蔭澄江入野船。黃鳥晚啼愁瘴雨，青梅早落中蠻煙。不知幾首南行曲，留與巴兒萬古傳。',\n",
       " ' 昔年共照松溪影，松折溪荒僧已無。今日重思錦城事，雪銷花謝夢何殊。亂離未定身俱老，騷雅全休道甚孤。我拜師門更南去，荔枝春熟向渝瀘。',\n",
       " ' 舊齋松老別多年，香社人稀喪亂間。出寺秪知趨內殿，閉門長似在深山。臥聽秦樹秋鐘斷，吟想荆江夕鳥還。唯恐興來飛錫去，老郎無路更追攀。',\n",
       " ' 海棠風外獨霑巾，襟袖無端惹蜀塵。和暖又逢挑菜日，寂寥未是探花人。不嫌蟻酒衝愁肺，却憶漁蓑覆病身。何事晚來微雨後，錦江春學曲江春。',\n",
       " ' 所向明知是暗投，兩行清淚語前流。雲橫新塞遮秦甸，花落空山入閬州。不忿黃鸝驚曉夢，唯應杜宇信春愁。梅黃麥綠無歸處，可得漂漂愛浪遊。',\n",
       " ' 蔟蔟新英摘露光，小江園裏火煎嘗。吳僧漫說鴉山好，蜀叟休誇鳥觜香。合座半甌輕泛綠，開緘數片淺含黃。鹿門病客不歸去，酒渴更知春味長。',\n",
       " ' 永巷閑吟一徑蒿，輕肥大笑事風騷。煙含紫禁花期近，雪滿長安酒價高。失路漸驚前計錯，逢僧更念此生勞。十年春淚催衰颯，羞向清流照鬢毛。',\n",
       " ' 石城昔爲莫愁鄉，莫愁魂散石城荒。江人依舊棹舴艋，江岸還飛雙鴛鴦。帆去帆來風浩渺，花開花落春悲涼。煙濃草遠望不盡，千古漢陽閑夕陽。',\n",
       " ' 馬頭春向鹿頭關。遠樹平蕪一望閑，雪下文君沾酒市。雲藏李白讀書山，江樓客恨黃梅後。村落人歌紫芋間，堤月橋燈好時景。漢庭無事不征蠻。',\n",
       " ' 夜無多雨曉生塵，草色嵐光日日新。蒙頂茶畦千點露，浣花牋紙一溪春。揚雄宅在唯喬木，杜甫臺荒絕舊鄰。却共海棠花有約，數年留滯不歸人。',\n",
       " ' 渚遠江清碧簟紋，小桃花繞薛濤墳。朱橋直指金門路，粉堞高連玉壘雲。窗下斵琴翹鳳足，波中濯錦散鷗羣。子規夜夜啼巴樹，不並吳鄉楚國聞。',\n",
       " ' 石門蘿徑與天鄰，雨檜風篁遠近聞。飲澗鹿喧雙派水，上樓僧蹋一梯雲。孤煙薄暮關城沒，遠色初晴渭曲分。長欲然香來此宿，北林猨鶴舊同羣。',\n",
       " ' 往事悠悠添浩歎，勞生擾擾竟何能。故山歲晚不歸去，高塔晴來獨自登。林下聽經秋苑鹿，江邊掃葉夕陽僧。吟餘却起雙峰念，曾看菴西瀑布冰。',\n",
       " ' 一脈清泠何所之，縈莎漱蘚入僧池。雲邊野客窮來處，石上寒猨見落時。聚沫繞崖殘雪在，迸流穿樹墮花隨。煙春雨晚閑吟去，不復遠尋皇子陂。',\n",
       " ' 千重二華見皇州，望盡凝嵐即此樓。細雨不藏秦樹色，夕陽空照渭河流。後車寧見前車覆，今日難忘昨日憂。擾擾塵中猶未已，可能疏傅獨能休。',\n",
       " ' 九陌低迷誰問我，五湖流浪可悲君。著書笑破蘇司業，賦詠思齊鄭廣文。理棹好攜三百首，阻風須飲幾千分。耒陽江口春山綠，慟哭應尋杜甫墳。',\n",
       " ' 得意却思尋舊跡，新銜未切向蘭臺。吟看秋草出關去，逢見故人隨計來。勝地昔年詩板在，清歌幾處郡筵開。江湖易有淹留興，莫待春風落庾梅。',\n",
       " ' 失意離愁春不知，到家時是落花時。孤單取事休言命，早晚逢人苦愛詩。度塞風沙歸路遠，傍河桑柘舊居移。應嗟我又巴江去，遊子悠悠聽子規。',\n",
       " ' 歸去宜春春水深，麥秋梅雨過湘陰。鄉園幾度經狂寇，桑柘誰家有舊林。結綬位卑甘晚達，登龍心在且高吟。灞陵橋上楊花裏，酒滿芳樽淚滿襟。',\n",
       " ' 丹霞照上三清路，瑞錦裁成五色毫。波浪不能隨世態，鸞凰應得入吾曹。秋山晚水吟情遠，雪竹風松醉格高。預想明年騰躍處，龍津春碧浸仙桃。',\n",
       " ' 逐勝偷閑向杜陵，愛僧不愛紫衣僧。身爲醉客思吟客，官自中丞拜右丞。殘月露垂朝闕蓋，落花風動宿齋燈。孤單小諫漁舟在，心戀清潭去未能。',\n",
       " ' 予名初在德門前，屈指年來三十年。自賀孤危終際會，別將流涕感階緣。止陪鴛鴦居清秩，濫應星辰浼上玄。平昔苦心何所恨，受恩多是舊詩篇。',\n",
       " ' 官舍種莎僧對榻，生涯如在舊山貧。酒醒草檄聞殘漏，花落移廚送晚春。水墨畫松清睡眼，雲霞仙氅挂吟身。霜臺伏首思歸切，莫把漁竿逐逸人。',\n",
       " ' 耻將官業競前途，自愛篇章古不如。一炷香新開道院，數坊人聚避朝車。縱遊藉草花垂酒，閑臥臨窗燕拂書。唯有明公賞新句，秋風不敢憶鱸魚。',\n",
       " ' 平生詩譽更誰過，歸老東吳命若何。知己凋零垂白髮，故園寥落近滄波。酒醒蘚砌花陰轉，病起漁舟鷺跡多。深入富春人不見，閑門空掩半庭莎。',\n",
       " ' 爲郡東吳秪飲冰，瑣闈頻降鳳書徵。隨行已有朱衣吏，伴直多招紫閣僧。窗下調琴鳴遠水，簾前睡鶴背秋燈。葦陂竹塢情無限，閑話毘陵問杜陵。',\n",
       " ' 柳近清明翠縷長，多情右衮不相忘。開緘雖覩新篇麗，破鼻須聞冷酒香。時態嬾隨人上下，花心甘被蝶分張。朝稀且莫輕春賞，勝事由來在帝鄉。',\n",
       " ' 喧卑從宦出喧卑，別畫能琴又解棊。海上春耕因亂廢，年來冬薦得官遲。風中夜犬驚槐巷，月下寒驢嚙槿籬。孤散恨無推唱路，耿懷吟得贈君詩。',\n",
       " ' 結茅秪約釣魚臺，濺水鸕鷀去又迴。春臥甕邊聽酒熟，露吟庭際待花開。三江勝景遨遊徧，百氏羣書講貫來。國步未安風雅薄，可能高尚掞天才。',\n",
       " ' 仙步徐徐整羽衣，小儀澄澹轉中儀。樺飄紅燼趨朝路，蘭縱清香宿省時。彩筆煙霞供不足，綸闈鸞鳳訝來遲。自憐孤宦誰相念，禱祝空吟一首詩。',\n",
       " ' 寂寂風簾信自垂，楊花筍籜正離披。長安一夜殘春雨，右省三年老拾遺。坐看羣賢爭得路，退量孤分且吟詩。五湖煙網非無意，未去難忘國士知。',\n",
       " ' 賦分多情却自嗟，蕭衰未必爲年華。睡輕可忍風敲竹，飲散那堪月在花。薄宦因循拋峴首，故人流落向天涯。鶯春鴈夜長如此，賴是幽居近酒家。',\n",
       " ' 非才偶忝直文昌，兩鬢年深一鏡霜。待漏敢辭稱小吏，立班猶未出中行。孤吟馬跡拋槐陌，遠夢漁竿擲葦鄉。',\n",
       " ' 飲筵博席與心違，野眺春吟更是誰。琴有澗風聲轉澹，詩無僧字格還卑。恨拋水國荷蓑雨，貧過長安櫻筍時。頭角俊髦應指笑，權門蹤跡獨差池。',\n",
       " ' 強健宦途何足謂，入微章句更難論。誰知野性真天性，不扣權門扣道門。窺硯晚鶯臨砌樹，迸堦春筍隔籬根。朝迴何處消長日，紫閣峰南有舊村。',\n",
       " ' 漠漠秦雲澹澹天，新年景象入中年。情多最恨花無語，愁破方知酒有權。苔色滿牆尋故第，雨聲一夜憶春田。衰遲自喜添詩學，更把前題改數聯。',\n",
       " ' 紫陌奔馳不暫停，送迎終日在郊坰。年來鬢畔未垂白，雨後江頭且蹋青。浮蟻滿盃難暫捨，貫珠一曲莫辭聽。春風秪有九十日，可合花前半日醒。',\n",
       " ' 鶯離寒谷士逢春，釋褐來年暫種芸。自笑老爲梅少府，可堪貧攝鮑參軍。酒醒往事多興念，吟苦鄰居必厭聞。推却簿書搔短髮，落花飛絮正紛紛。',\n",
       " ' 槿墜蓬疎池館清，日光風緒澹無情。鱸魚斫鱠輸張翰，橘樹呼奴羨李衡。十口漂零猶寄食，兩川消息未休兵。',\n",
       " ' 臘雪初晴共舉盃，便期攜手上春臺。高情唯怕酒不滿，長逝可悲花正開。曉奠鶯啼殘漏在，風幃燕覓舊巢來。杜陵芳草年年綠，醉魄吟魂無復迴。',\n",
       " ' 昔事東流共不迴，春深獨向渼陂來。亂前別業依稀在，雨裏繁花寂寞開。却展漁絲無野艇，舊題詩句沒蒼苔。潸然四顧難消遣，秪有佯狂泥酒盃。',\n",
       " ' 露入庭蕪恨已深，熱時天下是知音。汗流浹背曾施力，氣爽中宵便負心。一片山溪從蠹損，數行文字任塵侵。綠槐陰合清和後，不會何顏又見尋。',\n",
       " ' 幽居不稱在長安，溝淺浮春岸雪殘。板屋漸移方帶野，水車新入夜添寒。名如有分終須立，道若離心豈易寬。滿眼塵埃馳騖去，獨尋煙竹翦漁竿。',\n",
       " ' 三轉郎曹自勉旃，莎階吟步想前賢。未如何遜無佳句，若比馮唐是壯年。捧制名題黃紙尾，約僧心在白雪邊。乳毛松雪春來好，直夜清閑且學禪。',\n",
       " ' 鳳策聯華是國華，春來偶未上仙槎。鄉連南渡思菰米，淚滴東風避杏花。吟聒暮鶯歸廟院，睡消遲日寄僧家。一般情緒應相信，門靜莎深樹影斜。',\n",
       " ' 敷溪南岸掩柴荆，挂却朝衣愛淨名。閑得林園栽樹法，喜聞兒姪讀書聲。眠窗日暖添幽夢，步野風清散酒酲。謫去徵還何擾擾，片雲相伴看衰榮。',\n",
       " ' 令節爭歡我獨閑，荒臺盡日向晴山。渾無酒泛金英菊，漫道官趨玉筍班。深愧青莎迎野步，不堪紅葉照衰顏。羨君官重多吟興，醉帶南陂落照還。',\n",
       " ' 錦帳名郎重錦科，清宵寓直縱吟哦。冰含玉鏡春寒在，粉傅仙闈月色多。視草即應歸屬望，握蘭知道暫經過。流鶯百囀和殘漏，猶把芳樽藉露莎。',\n",
       " ' 十年五年岐路中，千里萬里西復東。匹馬愁衝晚村雪，孤舟悶阻春江風。達士由來知道在，昔賢何必哭途窮。閑烹蘆筍炊菰米，會向源鄉作醉翁。',\n",
       " ' 昔年吟醉繞江蘺，愛把漁竿伴鷺鶿。聞說小毫能縱逸，敢憑輕素寫幽奇。涓涓浪濺殘菱蔓，戛戛風搜折葦枝。得向曉窗閑挂翫，雪蓑煙艇恨無遺。',\n",
       " ' 香浮玉陛曉辭天，袍拂蒲茸稱少年。郎署轉曹雖久次，京河亞尹是優賢。縱遊雲水無公事，貴買琴書有俸錢。今日龍門看松雪，探春明日向平泉。',\n",
       " ' 攲枕高眠日午春，酒酣睡足最閑身。明朝會得窮通理，未必輸他馬上人。',\n",
       " ' 翠嵐迎步興何長，笑領漁翁入醉鄉。日暮渚田微雨後，鷺鶿閑暇稻花香。',\n",
       " ' 承時偷喜負明神，務實那能得庇身。不會蒼蒼主何事，忍飢多是力耕人。',\n",
       " ' 騷雅荒涼我未安，月和餘雪夜吟寒。相門相客應相笑，得句勝於得好官。',\n",
       " ' 流水歌聲共不迴，去年天氣舊亭臺。梁塵寂寞燕歸去，黃蜀葵花一朵開。',\n",
       " ' 多感京河李丈人，童蒙受教便書紳。文章至竟無功業，名宦由來致苦辛。皎日還應知守道，平生自信解甘貧。孤單所得皆逾分，歸種敷溪一畝春。',\n",
       " ' 韋曲樊川雨半晴，竹莊花院徧題名。畫成煙景垂楊色，滴破春愁壓酒聲。滿野紅塵誰得路，連天紫閣獨關情。渼陂水色澄於鏡，何必滄浪始濯纓。',\n",
       " ' 九派迢迢九月殘，舟人相語且相寬。村逢好處嫌風便，酒到醒來覺夜寒。蓼渚白波喧夏口，柿園紅葉憶長安。季鷹可是思鱸鱠，引退知時自古難。',\n",
       " ' 半年奔走頗驚魂，來謁行宮淚眼昏。鴛鷺入朝同待漏，牛羊送日獨歸村。灞陵散失詩千首，太華淒涼酒一樽。兵革未休無異術，不知何以受君恩。',\n",
       " ' 朝直叨居省閣間，由來疎退校安閑。落花夜靜宮中漏，微雨春寒廊下班。自扣玄門齊寵辱，從他榮路用機關。孤峰未得深歸去，名畫偏求水墨山。',\n",
       " ' 亂來奔走巴江濱，愁客多於江徼人。朝醉暮醉雪開霽，一枝兩枝梅探春。詔書罪己方哀痛，鄉縣徵兵尚苦辛。鬢禿又驚逢獻歲，眼前渾不見交親。',\n",
       " ' 都官雖未是名郎，踐歷曾聞薛許昌。復有李公陪雅躅，豈宜鄭子忝餘光。榮爲後進趨蘭署，喜拂前題在粉牆。他日節旄如可繼，不嫌曹冷在中行。',\n",
       " ' 桑林搖落渭川西，蓼水瀰瀰接稻泥。幽檻靜來魚唱遠，暝天寒極鴈行低。濁醪最稱看山醉，冷句偏宜選竹題。中表人稀離亂後，花時莫惜重相攜。',\n",
       " ' 詩人公署如山舍，秪向堦前便採薇。驚燕拂簾閑睡覺，落花沾硯會餐歸。壁看舊記官多達，牓挂明文吏莫違。自說小池栽葦後，雨涼頻見鷺鶿飛。',\n",
       " ' 舊詩常得在高吟，不奈公心愛苦心。道自瑣闈言下振，恩從仙殿對迴深。流年漸覺霜欺鬢，至藥能教土化金。自拂青萍知有地，齋誠旦夕望爲霖。',\n",
       " ' 七子風騷尋失主，五君歌誦久無聲。調和雅樂歸時正，澄濾頹波到底清。才大始知寰宇窄，吟高何止鬼神驚。葉公好尚渾疎闊，忽見真龍幾喪明。',\n",
       " ' 初昇諫署是真仙，浪透桃花恰五年。垂白郎官居座末，著緋人吏立階前。百寮班列趨丹陛，兩掖風清上碧天。從此追飛何處去，金鑾殿與玉堂連。',\n",
       " ' 小梅零落雪欺殘，浩蕩窮愁豈易寬。唯有郎吟償晚景，且無濃醉厭春寒。高齋每喜追攀近，麗句先憂屬和難。十五年前諳苦節，知心不獨爲同官。',\n",
       " ' 何宋清名動粉闈，不才今日偶陳詩。考功豈敢聞題品，水部猶須繫挈維。積雪巷深酬唱夜，落花牆隔笑言時。紫垣名士推揚切，爲話心孤倍感知。',\n",
       " ' 曾袖篇章謁長卿，今來附鳳事何榮。星臨南省陪仙步，春滿東朝接珮聲。談笑不拘先後禮，歲寒仍契子孫情。龍墀仗下天街暖，共看圭峰並馬行。',\n",
       " ' 靈一心傳清塞心，可公吟後楚公吟。近來雅道相親少，唯仰吾師所得深。好句未停無暇日，舊山歸老有東林。冷曹孤宦甘寥落，多謝攜筇數訪尋。',\n",
       " ' 如此浮生更別離，可堪長慟送春歸。潼江水上楊花雪，剛逐孤舟繚繞飛。',\n",
       " ' 能消永日是摴蒱，坑塹由來似宦途。兩擲未終楗橛內，座中何惜爲呼盧。',\n",
       " ' 毿毿金蕊撲晴空，舉子魂驚落照中。今日老郎猶有恨，昔年相虐十秋風。',\n",
       " ' 和煙和雨遮敷水，映竹映村連灞橋。撩亂春風耐寒令，到頭贏得杏花嬌。',\n",
       " ' 水繞荒墳縣路斜，耕人訝我久咨嗟。重來兼恐無尋處，落日風吹鼓子花。',\n",
       " ' 細雨溼萋萋，人稀江日西。春愁腸已斷，不在子規啼。',\n",
       " ' 細雨濕淒淒，人稀江日西。春膓已愁斷，不待子規啼。',\n",
       " ' 清香聞曉蓮，水國雨餘天。天氣正得所，客心剛悄然。亂兵何日息，故老幾人全。此際難消遣，從來未學禪。',\n",
       " ' 捧日整朝簪，千官一片心。班趨黃道急，殿接紫宸深。威鳳迴香扆，新鶯囀上林。小松含瑞露，春翠易成陰。',\n",
       " ' 流落夜淒淒，春寒錦浦西。不甘花逐水，可惜雪成泥。病眼嫌燈近，離腸賴酒迷。憑君囑鵯鵊，莫向五更啼。',\n",
       " ' 萬仞白雲端，經春雪未殘。夏消江峽滿，晴照蜀樓寒。造境知僧熟，歸林認鶴難。會須朝闕去，秪有畫圖看。',\n",
       " ' 孟子有良策，惜哉今已而。徒將心體國，不識道消時。折檻未爲切，沈湘何足悲。蒼蒼無問處，煙雨徧江蘺。',\n",
       " ' 草肥朝牧牛，桑綠晚鳴鳩。列岫簷前見，清泉碓下流。春蔬和雨割，社酒向花篘。引我南陂去，籬邊有小舟。',\n",
       " ' 前山微有雨，永巷淨無塵。牛臥籬陰晚，鳩鳴村意春。時浮應寡合，道在不嫌貧。後徑臨陂水，菰蒲是切鄰。',\n",
       " ' 秋深庭色好，紅葉間青松。病客殊無著，吾師甚見容。疎鐘和細溜，高塔等遙峰。未省求名侶，頻於此地逢。',\n",
       " ' 寺在帝城陰，清虛勝二林。蘚侵隋畫暗，茶助越甌深。巢鶴和鐘唳，詩僧倚錫吟。煙莎後池水，前跡杳難尋。',\n",
       " ' 山半古招提，空林雪月迷。亂流分石上，斜漢在松西。雲集寒菴宿，猨先曉磬啼。此心如了了，即此是曹溪。',\n",
       " ' 夫子道何孤，青雲未得途。詩書難捨魯，山水暫遊吳。野綠梅陰重，江春浪勢麤。秣陵兵役後，舊業半成蕪。',\n",
       " ' 古柏間疎篁，清陰在印牀。宿郊虔點饌，秋寺靜監香。參集行多揖，風儀見即莊。佇聞橫擘去，帷集諫書囊。',\n",
       " ' 才拙道仍孤，無何捨釣徒。班雖沾玉筍，香不近金爐。雨露瞻雙闕，煙波隔五湖。唯君應見念，曾共伏青蒲。',\n",
       " ' 中峰曾到處，題記沒蒼苔。振錫傳深谷，翻經想舊臺。蒼松臨砌偃，驚鹿驀溪來。內殿評詩切，身迴心未迴。',\n",
       " ' 乖慵居竹裏，涼冷臥池東。一霎芰荷雨，幾迴簾幕風。遠僧來扣寂，小吏笑書空。衰鬢霜供白，愁顏酒借紅。扇輕搖鷺羽，屏古畫漁翁。自得無端趣，琴棊舫子中。',\n",
       " ' 寓直事非輕，宦孤憂且榮。制承黃紙重，詞見紫垣清。曉霽庭松色，風和禁漏聲。僧攜新茗伴，吏掃落花迎。鎖印詩心動，垂簾睡思生。粉廊曾試處，石柱昔賢名。來誤宮窗燕，啼疑苑樹鶯。殘陽應更好，歸促恨嚴城。',\n",
       " ' 握蘭將滿歲，栽菊伴吟詩。老去慵趨世，朝迴獨繞籬。遞香風細細，澆綠水瀰瀰。秪共山僧賞，何當國士移。孤根深有託，微雨正相宜。更待金英發，憑君插一枝。',\n",
       " ' 共待輝光夜，翻成黯澹秋。正宜清路望，潛起滴堦愁。棹倚袁宏渚，簾垂庾亮樓。桂無香實落，蘭有露花休。玉漏添蕭索，金尊阻獻酬。明年佳景在，相約向神州。',\n",
       " ' 含香復記言，清秩稱當年。點筆非常筆，朝天最近天。家聲三相後，公事一人前。詩句江郎伏，書蹤甯氏傳。風標欺鷺鶴，才力湧沙泉。居僻貧無慮，名高退更堅。漁舟思靜泛，僧榻寄閑眠。消息當彌入，絲綸的粲然。依棲常接跡，屬和舊盈編。開口人皆信，淒涼是謝氈。',\n",
       " ' 減瘦經多難，憂傷集晚年。吟高風過樹，坐久夜涼天。旅退慙隨衆，孤飛怯向前。釣朋蓑叟在，藥術衲僧傳。鬢禿趨榮路，腸焦鄙盜泉。品徒誠有隔，推唱意何堅。寒地殊知感，秋燈耿不眠。從來甘默爾，自此倍怡然。蘭爲官須握，蒲因學更編。預愁搖落後，子美笑無氈。',\n",
       " ' 篇篇高且真，真爲國風陳。澹薄雖師古，縱橫得意新。翦裁成幾篋，唱和是誰人。華岳題無敵，黃河句絕倫。吟殘荔枝雨，詠徹海棠春。李白欺前輩，陶潛仰後塵。難忘嵩室下，不負蜀江濱。屬思看山眼，冥搜倚樹身。楷模勞夢想，諷誦爽精神。落筆空追愴，曾蒙借斧斤。',\n",
       " ' 何遜蘭休握，陶潛柳正垂。官清真塞詔，事簡好吟詩。春漏懷丹闕，涼船泛碧伊。已虛西閣位，朝夕鳳書追。',\n",
       " ' 可愛咸陽王主簿，窮經盡到昔賢心。登科未足酬多學，執卷猶聞惜寸陰。自與山妻舂斗粟，祗憑鄰叟典孤琴。我來賒酒相留宿，聽我披衣看雪吟。',\n",
       " ' 下視垂楊拂路塵，雙峰石上覆苔文。濃霜滿逕無紅葉，晚日高枝有白雲。春砌花飄僧旋掃，寒溪子落鶴先聞。那堪寂寞悲風起，千樹深藏李白墳。',\n",
       " ' 江國正寒春信穩，嶺頭枝上雪飄飄。何言落處堪惆悵，直是開時也寂寥。素豔照尊桃莫比，孤香黏袖李須饒。離人南去腸應斷，片片隨鞭過楚橋。',\n",
       " ' 一自王喬放自由，俗人行處嬾回頭。睡輕旋覺松花墮，舞罷閑聽澗水流。羽翼光明欺積雪，風神灑落占高秋。應嫌白鷺無仙骨，長伴漁翁宿葦洲。',\n",
       " ' 強插黃花三兩枝，還圖一醉浸愁眉。半牀斜月醉醒後，惆悵多於未醉時。',\n",
       " ' 武德門前顥氣新，雪融鴛瓦土膏春。夜來夢到宣麻處，草沒龍墀不見人。',\n",
       " ' 多虞難住人稀處，近耗渾無戰罷碁。向闕歸山俱未得，且沽春酒且吟詩。',\n",
       " ' 閑披短褐杖山藤，頭不是僧心是僧。坐睡覺來清夜半，芭蕉影動道場燈。',\n",
       " ' 遮莫江頭柳色遮，日濃鶯睡一枝斜。女郎折得殷勤看，道是春風及第花。',\n",
       " ' 寒步江村折得梅，孤香不肯待春催。滿枝盡是愁人淚，莫殢朝來露溼來。',\n",
       " ' 畫堂簾卷張清宴，含香帶霧情無限。春風愛惜未放開，柘枝鼓振紅英綻。',\n",
       " ' 江郡人稀便是村，踏青天氣欲黃昏。春愁不破還成醉，衣上淚痕和酒痕。',\n",
       " ' 柳絲牽水杏房紅，煙岸人稀草色中。日暮一行高鳥處，依稀合是望春宮。',\n",
       " ' 閑把羅衣泣鳳皇，先朝曾教舞霓裳。春來却羨庭花落，得逐晴風出禁牆。',\n",
       " ' 流水君恩共不回，杏花爭忍掃成堆。殘春未必多煙雨，淚滴閑堦長綠苔。',\n",
       " ' 竹巷溪橋天氣涼，荷開稻熟村酒香。唯憂野叟相迴避，莫道儂家是漢郎。',\n",
       " ' 宗人忽惠西山藥，四味清新香助茶。爽得心神便騎鶴，何須燒得白朱砂。',\n",
       " ' 遠俗只憑淫祀切，多年平子固悠悠。江煙日午無簫鼓，直到如今詠四愁。',\n",
       " ' 驚飛失勢粉牆高，好箇聲音好羽毛。小婢不須催柘彈，且從枝上喫櫻桃。',\n",
       " ' 搢紳奔避復淪亡，消息春來到水鄉。屈指故人能幾許，月明花好更悲涼。',\n",
       " ' 江天冬暖似花時，上國音塵杳未知。正被蟲聲喧老耳，今君又借薛能詩。',\n",
       " ' 冷曹孤宦本相宜，山在牆南落照時。洗竹澆莎足公事，一來贏寫一聯詩。',\n",
       " ' 日日池邊載酒行，黃昏猶自遶黃英。重陽過後頻來此，甚覺多情勝薄情。',\n",
       " ' 散賦宂書高且奇，百篇仍有百篇詩。江湖休灑春風淚，十軸香於一桂枝。',\n",
       " ' 時無韓柳道難窮，也覺天公不至公。看取年年金牓上，幾人才氣似揚雄。',\n",
       " ' 趨馳早晚休，一歲又殘秋。若只如今日，何難致白頭。滄波歸處遠，旅舍向邊愁。賴見前賢說，窮通不自由。',\n",
       " ' 路窮川島上，果值古仙家。陰洞長鳴磬，石泉寒泛花。莓苔深峭壁，煙靄積層崖。難見囊中術，人間有歲華。',\n",
       " ' 高步陟崔嵬，吟閑路惜迴。寺從何代有，僧是梵宮來。暮靄連沙積，餘霞逼檻開。更期招靜者，長嘯上方臺。',\n",
       " ' 廣澤去無邊，夜程風信偏。疎星遙抵浪，遠燒似迎船。響嶽猿相次，翻空雁接連。北歸家業就，深處更踰年。',\n",
       " ' 開閣雨吹塵，陶家揖上賓。湖山萬疊翠，汀樹一行春。景逼歸簷燕，歌喧已醉身。登臨興未足，喜有數年因。',\n",
       " ' 山海兩分歧，停舟偶此期。別來何限意，相見卻無詞。坐永神疑夢，愁多鬢欲絲。趨名易遲晚，此去莫經時。',\n",
       " ' 苦心終是否，捨此復無營。已致歸成晚，非緣去有程。館空吟向月，霜曙坐聞更。住久誰相問，馳羸又獨行。',\n",
       " ' 分散多如此，人情豈自由。重來看月夕，不似去年秋。息慮雖孤寢，論空未識愁。須同醉鄉者，萬事付江流。',\n",
       " ' 孤舟方此去，嘉景稱於聞。煙盡九峰雪，雨生諸派雲。沙寒鴻鵠聚，底極龜魚分。異日誰爲侶，逍遙耕釣羣。',\n",
       " ' 巴蜀水南偏，山窮塞壘寬。歲時將近臘，草樹未知寒。獨狖啼朝雨，羣牛向暮灘。更聞蠻俗近，烽火不艱難。',\n",
       " ' 放逐非多罪，江湖偶不廻。深居應有謂，濟代豈無才。疊巘晴舒障，寒川暗動雷。誰能續高興，醉死一千杯。',\n",
       " ' 豈易投居止，廬山得此峰。主人曾已許，仙客偶相逢。顧己恩難答，窮經業未慵。還能勵僮僕，稍更補杉松。',\n",
       " ' 生平酌與吟，誰是見君心。上國一歸去，滄波閑至今。鐘繁秋寺遠，岸闊晚濤深。疎放長如此，何人更得尋。',\n",
       " ' 此身西復東，何計此相逢。夢盡吳越水，恨深湘漢鐘。積雲開去路，曙雪疊前峰。誰即知非舊，憐君忽見容。',\n",
       " ' 名高不俟召，操賦獻君門。偶屈應緣數，他人盡爲冤。新春城外路，舊隱水邊村。歸去無勞久，知音待更論。',\n",
       " ' 南游何所爲，一篋又空歸。守道安清世，無心換白衣。深溪猿共暮，絕頂客來稀。早晚還相見，論詩更及微。',\n",
       " ' 舊山來復去，不與世人論。得道書留篋，忘機酒滿尊。溪軒松偃坐，石室水臨門。應有頻相訪，相看坐到昏。',\n",
       " ' 君家滄海外，一別見何因。風土難知教，程途自致貧。浸天波色晚，橫吹鳥行春。明發千檣下，應爲更遠人。',\n",
       " ' 不易識蓬瀛，憑高望有程。盤根出巨浸，遠色到孤城。隱隱排雲峻，層層就日明。淨收殘靄盡，浮動嫩嵐輕。縱目徒多暇，馳心累發誠。從容更何往，此路徹三清。',\n",
       " ' 難窮林下趣，坐使致君恩。術業行當代，封章動諫垣。已明邪佞迹，幾雪薜蘿冤。報主深知此，憂民詎可論。名將山共古，跡與道俱存。爲謝重來者，何人更及門。',\n",
       " ' 離心醉豈懽，把酒彊相寬。世路須求達，還家亦未安。旅程愁算遠，江月坐吟殘。莫羨扁舟興，功成去不難。',\n",
       " ' 孤雲無定蹤，忽到又相逢。說盡天涯事，聽殘上國鐘。問人尋寺僻，乞食過街慵。憶到曾棲處，開門對數峰。',\n",
       " ' 平盡不平處，尚嫌功未深。應難將世路，便得稱師心。高鳥下殘照，白煙生遠林。更聞清磬發，聊喜緩塵襟。',\n",
       " ' 我泛瀟湘浦，君行指塞雲。兩鄉天外隔，一徑渡頭分。雨暗江花老，笳愁隴月曛。不堪來去鴈，迢遞思離羣。',\n",
       " ' 憤激計潛成，臨危豈顧生。秪空持一笏，便欲碎長鯨。國已酬徽烈，家猶聳義聲。不知青史上，誰可計功名。',\n",
       " ' 秋風吹故城，城下獨吟行。高樹鳥已息，古原人尚耕。流年川暗度，往事月空明。不復歎岐路，馬前塵夜生。',\n",
       " ' 把君詩一吟，萬里見君心。華髮新知少，滄洲舊隱深。潮衝虛閣上，山入暮窗沈。憶宿高齋夜，庭枝識海禽。',\n",
       " ' 四十年高夢，生涯指一丘。無人同久住，有鶴對冥修。草雜芝田出，泉和石髓流。更嫌庭樹老，疑是世間秋。',\n",
       " ' 何必問蓍龜，行藏自可期。但逢公道日，即是命通時。樂善知無厭，操心幸不欺。豈能花下淚，長似去年垂。',\n",
       " ' 木落曙江晴，寒郊極望平。孤舟三楚去，萬里獨吟行。鳥占橫查立，人當故里耕。十年來復去，不覺二毛生。',\n",
       " ' 雙黛儼如嚬，應傷故國春。江山非舊主，雲雨是前身。夢覺傳詞客，靈猶福楚人。',\n",
       " ' 懷君非一夕，此夕倍堪悲。華髮猶漂泊，滄洲又別離。冷禽棲不定，衰葉墮無時。況值干戈隔，相逢未可期。',\n",
       " ' 因君話故國，此夕倍依依。舊業臨秋水，何人在釣磯。浮名如縱得，滄海亦終歸。却是風塵裏，如何便息機。',\n",
       " ' 朝吟復暮吟，只此望知音。舉世輕孤立，何人念苦心。他鄉無舊識，落日羨歸禽。況住寒江上，漁家似故林。',\n",
       " ' 荒齋原上掩，不出動經旬。忽覺草木變，始知天地春。方期五字達，未厭一簞貧。麗句勞相勉，余非樂釣綸。',\n",
       " ' 承家望一名，幾欲問君平。自小非無志，何年即有成。豈能長失路，爭忍學歸耕。不擬逢昭代，悠悠過此生。',\n",
       " ' 天涯憔悴身，一望一霑巾。在處有芳草，滿城無故人。懷才皆得路，失計自傷春。清鏡不能照，鬢毛愁更新。',\n",
       " ' 物外與誰期，人間又別離。四方多事日，高岳獨游時。猨狖瀟湘樹，煙波屈宋祠。無因陪此去，空惜鬢將衰。',\n",
       " ' 欲愴峨嵋別，中宵寢不能。聽殘池上雨，吟盡枕前燈。失計方期隱，修心未到僧。雲門一萬里，應笑又擔簦。',\n",
       " ' 故里花應盡，江樓夢尚殘。半生吟欲過，一命達何難。特立珪無玷，相思草有蘭。二年春悵望，不似在長安。',\n",
       " ' 干時雖苦節，趨世且無機。及覺知音少，翻疑所業非。青雲如不到，白首亦難歸。所以滄江上，年年別釣磯。',\n",
       " ' 常時豈不別，此別異常情。南國初聞鴈，中原未息兵。暗蛩侵語歇，疎磬入吟清。曾聽無生說，辭師話此行。',\n",
       " ' 繡軛香韉夜不歸，少年爭惜最紅枝。東風一陣黃昏雨，又到繁華夢覺時。',\n",
       " ' 身世兩相惜，秋雲每獨興。難將塵界事，話向雪山僧。力善知誰許，歸耕又未能。此懷平不得，挑盡草堂燈。',\n",
       " ' 哀猨聽未休，禪景夜方幽。暫得同僧靜，那能免客愁。影搖雲外樹，聲褭月中秋。曾向巴江宿，當時淚亦流。',\n",
       " ' 以色靜胡塵，名還異衆嬪。免勞征戰力，無愧綺羅身。骨竟埋青塚，魂應怨畫人。不堪逢舊宅，寥落對江濱。',\n",
       " ' 三十世皇都，蕭條是霸圖。片墻看破盡，遺跡漸應無。野徑通荒苑，高槐映遠衢。獨吟人不問，清冷自嗚嗚。',\n",
       " ' 章句積微功，星霜二十空。僻應如我少，吟喜得君同。月上僧歸後，詩成客夢中。更聞棲鶴警，清露滴青松。',\n",
       " ' 故國望不見，愁襟難暫開。春潮映楊柳，細雨入樓臺。靜少人同到，晴逢鴈正來。長安遠於日，搔首獨徘徊。',\n",
       " ' 蘭杜曉香薄，汀洲夕露繁。併聞燕塞鴈，獨立楚人村。霧散孤城上，灘迴曙枕喧。不堪逢賈傅，還欲弔湘沅。',\n",
       " ' 一日又將暮，一年看即殘。病知新事少，老別舊交難。山盡路猶險，雨餘春却寒。那堪試迴首，烽火是長安。',\n",
       " ' 與世漸無緣，身心獨了然。講銷林下日，臘長定中年。磬絕朝齋後，香焚古寺前。非因送小朗，不到虎谿邊。',\n",
       " ' 湘浦離應晚，邊城去已孤。如何萬里計，只在一枝蘆。迥起波搖楚，寒棲月映蒲。',\n",
       " ' 幾行歸去盡，片影獨何之。暮雨相呼失，寒塘獨下遲。渚雲低暗度，關月冷遙隨。未必逢矰繳，孤飛自可疑。',\n",
       " ' 懷師不可攀，師往杳冥間。林下誰聞法，塵中只見山。終年人不到，盡日鳥空還。曾聽無生說，應憐獨未還。',\n",
       " ' 微燈照寂寥，此夕正迢迢。丹桂得已晚，故山歸尚遙。蟲聲移暗壁，月色動寒條。此去如真隱，期君試一瓢。',\n",
       " ' 久客厭岐路，出門吟且悲。平生未到處，落日獨行時。芳草不長綠，故人無重期。那堪更南渡，鄉國已天涯。',\n",
       " ' 坐徹秦城夏，行登越客船。去留那有著，語默不離禪。葉擁臨關路，霞明近海天。更尋同社侶，應得虎溪邊。',\n",
       " ' 孤吟望至公，已老半生中。不有同人達，兼疑此道窮。只應才自薄，豈是命難通。尚激摶溟勢，期君借北風。',\n",
       " ' 未敢分明賞物華，十年如見夢中花。遊人過盡衡門掩，獨自凭欄到日斜。',\n",
       " ' 忽憶曾棲處，千峰近沃州。別來秦樹老，歸去海門秋。汲帶寒汀月，禪隣賈客舟。遙思清興愜，不厭石林幽。',\n",
       " ' 煙老石磯平，袁郎夜泛情。數吟人不遇，千古月空明。人事年年別，春潮日日生。無因逢謝尚，風物自淒清。',\n",
       " ' 渚田芳草徧，共憶故山春。獨往滄洲暮，相看白髮新。定過林下寺，應見社中人。只恐東歸後，難將鷗鳥親。',\n",
       " ' 陶令昔居此，弄琴遺世榮。田園三畝綠，軒冕一銖輕。衰柳自無主，白雲猶可耕。不隨陵谷變，應只有高名。',\n",
       " ' 汀洲一夜泊，久客半連檣。盡說逢秋色，多同憶故鄉。孤岡生晚燒，獨樹隱回塘。欲問東歸路，遙知隔渺茫。',\n",
       " ' 長安名利路，役役古田今。征騎少閑日，綠楊無舊陰。水侵秦甸闊，草接漢陵深。紫閣曾過處，依稀白鳥沈。',\n",
       " ' 中朝軒冕內，久絕甯家親。白社同孤立，青雲獨併伸。致君期折檻，舉職在埋輪。須信堯庭草，猶能指佞人。',\n",
       " ' 聞鐘獨不齋，何事更關懷。靜少人過院，閑從草上堦。生臺無鳥下，石路有雲埋。爲憶禪中舊，時猶夢百崖。',\n",
       " ' 絕島跨危欄，登臨到此難。夕陽高鳥過，疎雨一鐘殘。駭浪搖空闊，靈山厭渺漫。那堪更回首，鄉樹隔雲端。',\n",
       " ' 漢皇輕萬乘，方士說三丹。不得修心要，翻知出世難。茂陵春竟綠，金掌曙空寒。何似先生去，翩翩逐彩鸞。',\n",
       " ' 遲遲傍曉陰，昨夜色猶深。畢竟終須落，堪悲古與今。明年何處見，盡日此時心。蜂蝶無情極，殘香更不尋。',\n",
       " ' 青青伊澗松，移植在蓮宮。蘚色前朝雨，秋聲半夜風。長閑應未得，暫賞亦難同。不及禪棲者，相看老此中。',\n",
       " ' 行山行採薇，閑翦蕙爲衣。避世嫌山淺，逢人說姓稀。有時還獨醉，何處掩衡扉？莫看棋終局，溪風晚待歸。',\n",
       " ' 年年南澗濱，力盡志猶存。雨雪朝耕苦，桑麻歲計貧。戰添丁壯役，老憶太平春。見說經荒後，田園半屬人。',\n",
       " ' 杜門朝復夕，豈是解謀身。夢不離泉石，林唯稱隱淪。漸諳浮世事，轉憶故山春。南國水風暖，又應生白蘋。',\n",
       " ' 讒勝禍難防，沈冤信可傷。本圖安楚國，不是怨懷王。廟古碑無字，洲晴蕙有香。獨醒人尚笑，誰與奠椒漿。',\n",
       " ' 一磴出林端，千峰次第看。長閑如未遂，暫到亦應難。谷樹雲埋老，僧窗瀑影寒。自嫌心不達，向此夢長安。',\n",
       " ' 一徑入千岑，幽人許重尋。不逢秦世亂，未覺武陵深。石轉生寒色，雲歸帶夕陰。却愁危坐久，看盡暝棲禽。',\n",
       " ' 風緊日淒淒，鄉心向此迷。水分平楚闊，山接故關低。客路緣烽火，人家厭鼓鼙。那堪獨馳馬，江樹穆陵西。',\n",
       " ' 旅泛本無定，相逢那可期。空懷白閣夜，未荅碧雲詩。暮雨潮生早，春寒鴈到遲。所思今不見，鄉國正天涯。',\n",
       " ' 步步入林中，山窮意未窮。偏逢僧話久，轉與鶴棲同。燭焰風銷盡，蘭條露濕空。又須從此別，江上正秋鴻。',\n",
       " ' 長爲鄉思侵，望極即霑襟。不是前山色，能傷愁客心。平蕪連海盡，獨樹隱雲深。況復斜陽外，分明有去禽。',\n",
       " ' 看看秋色晚，又是出門時。白髮生非早，青雲去自遲。夢唯懷上國，跡不到他岐。以此堅吾道，還無媿已知。',\n",
       " ' 又指煙波算路岐，此生多是厭羇離。正逢搖落仍須別，不待登臨已合悲。里巷半空兵過後，水雲初冷鴈來時。扁舟未得如君去，空向滄江夢所思。',\n",
       " ' 正聞青犢起葭萌，又報黃巾犯漢營。豈是將皆無上略，直疑天自棄蒼生。瓜沙舊戍猶傳檄，吳楚新春已廢耕。見說聖君能仄席，不知誰是請長纓。',\n",
       " ' 葦聲騷屑水天秋，吟對金陵古渡頭。千古是非輸蝶夢，一輪風雨屬漁舟。若無仙分應須老，幸有歸山即合休。何必登臨更惆悵，比來身世只如浮。',\n",
       " ' 雕琢文章字字精，我經此處倍傷情。身從謫宦方霑祿，才被槌埋更有聲。過縣已無曾識吏，到廳空見舊題名。長江一曲年年水，應爲先生萬古清。',\n",
       " ' 鱗鬣催殘志未休，壯心飜是此身讐。併聞寒雨多因夜，不得鄉書又到秋。耕釣舊交吟好憶，雪霜危棧去堪愁。如何只是三年別，君著朱衣我白頭。',\n",
       " ' 達即匡邦退即耕，是非何足撓平生。終期道向希夷得，未省心因寵辱驚。峰轉暫無當戶影，雉飛時有隔林聲。十年惟悟吟詩句，待得中原欲鑄兵。',\n",
       " ' 斷行哀響遞相催，爭趁高秋作恨媒。雲外關山聞獨去，渡頭風雨見初來。也知榆塞寒須別，莫戀蘋汀暖不迴。試向富春江畔過，故園猶合有池臺。',\n",
       " ' 悵望春襟鬱未開，重吟鸚鵡益堪哀。曹瞞尚不能容物，黃祖何曾解愛才。幽島暖聞燕鴈去，曉江晴覺蜀波來。何人正得風濤便，一點輕帆萬里迴。',\n",
       " ' 覆楚讐韓勢有餘，男兒遭遇更難如。偶成漢室千年業，只讀圯橋一卷書。翻把壯心輕尺組，却煩商皓正皇儲。若能終始匡天子，何必□□□□□。',\n",
       " ' 漢室河山鼎勢分，勤王誰肯顧元勳。不知征伐由天子，唯許英雄共使君。江上戰餘陵是谷，渡頭春在草連雲。分明勝敗無尋處，空聽漁歌到夕曛。',\n",
       " ' 五陵豪俠笑爲儒，將爲儒生只讀書。看取不成投筆後，謝安功業復何如。',\n",
       " ' 秦國金陵王氣全，一龍正道始東遷。興亡竟不關人事，虛倚長淮五百年。',\n",
       " ' 水流花謝兩無情，送盡東風過楚城。胡蝶夢中家萬里，子規枝上月三更。故園書動經年絕，華髮春唯滿鏡生。自是不歸歸便得，五湖煙景有誰爭。',\n",
       " ' 寸寸凌霜長勁條，路人猶笑未干霄。南園桃李雖堪羨，爭奈春殘又寂寥。',\n",
       " ' 蒼山遙遙江潾潾，路傍老盡沒閑人。王孫不見草空綠，惆悵渡頭春復春。',\n",
       " ' 煙愁雨細雲冥冥，杜蘭香老三湘清。故山望斷不知處，鶗鴂隔花時一聲。',\n",
       " ' 分明三鳥下儲胥，一覺鈞天夢不如。爭那白頭方士到，茂陵紅葉已蕭疎。',\n",
       " ' 三聲戍角邊城暮，萬里鄉心塞草春。莫學少年輕遠別，隴關西少向東人。',\n",
       " ' 家依楚塞窮秋別，身逐孤舟萬里行。一曲巴歌半江月，便應消得二毛生。',\n",
       " ' 煙外橈聲遠，天涯幽夢迴。爭知江上客，不是故鄉來。',\n",
       " ' 海棠花底三年客，不見海棠花盛開。却向江南看圖畫，始慙虛到蜀城來。',\n",
       " ' 得路直爲霖濟物，不然閑共鶴忘機。無端却向陽臺畔，長送襄王暮雨歸。',\n",
       " ' 殘陽楚水畔，獨弔舜時人。不及廟前草，至今江上春。',\n",
       " ' 登高迎送遠，春恨併依依。不得滄洲信，空看白鶴歸。',\n",
       " ' 歡戚猶來恨不平，此中高下本無情。韓娥絕唱唐衢哭，盡是人間第一聲。',\n",
       " ' 秋入池塘風露微，曉開籠檻看初飛。滿身金翠畫不得，無限煙波何處歸。',\n",
       " ' 遠辭巖竇瀉潺潺，靜拂雲根別故山。可惜寒聲留不得，旋添波浪向人間。',\n",
       " ' 五千里外三年客，十二峰前一望秋。無限別魂招不得，夕陽西下水東流。',\n",
       " ' 幽植衆寧知，芬芳只暗持。自無君子佩，未是國香衰。白露霑長草，春風到每遲。不如當路草，芬馥欲何爲。',\n",
       " ' 四朝十帝盡風流，建業長安兩醉遊。唯有一篇楊柳曲，江南江北爲君愁。',\n",
       " ' 古殿春殘綠野陰，上皇曾此駐泥金。三城帳屬升平夢，一曲鈴關悵望心。苑路暗迷香輦絕，繚垣秋斷草煙深。前朝舊物東流在，猶爲年年下翠岑。',\n",
       " ' 迢遰三巴路，羇危萬里身。亂山殘雪夜，孤燭異鄉春。漸與骨肉遠，轉於僮僕親。那堪正漂泊，明日歲華新。',\n",
       " ' 百尺森疎倚梵臺，昔人誰見此初栽。故園未有偏堪戀，浮世如閑即合來。天暝豈分蒼翠色，歲寒應識棟梁材。清陰可惜不駐得，歸去暮城空首回。',\n",
       " ' 朝朝車馬如蓬轉，處處江山待客歸。若使人間少離別，楊花應合過春飛。',\n",
       " ' 年年七夕渡瑤軒，誰道秋期有淚痕。自是人間一週歲，何妨天上只黃昏。',\n",
       " ' 九重城外家書遠，百里洲前客棹還。金印碧幢如見問，一生安穩是長閑。',\n",
       " ' 襄陽好向峴亭看，人物蕭條值歲闌。爲報習家多置酒，夜來風雪過江寒。',\n",
       " ' 越鳥巢邊溪路斷，秦人耕處洞門開。小桃花發春風起，千里江山一夢回。',\n",
       " ' 江北不如南地暖，江南好斷北人腸。燕脂桃頰棃花粉，共作寒梅一面粧。',\n",
       " ' 細雨滿江春水漲，好風留客野梅香。避秦不是無歸意，一度逢花一斷腸。',\n",
       " ' 銀臺直北金鑾外，暑雨初晴皓月中。唯對松篁聽刻漏，更無塵土翳虛空。綠香熨齒冰盤果，清冷侵肌水殿風。夜久忽聞鈴索動，玉堂西畔響丁東。',\n",
       " ' 清暑簾開散異香，恩深咫尺對龍章。花應洞裏尋常發，日向壺中特地長。坐久忽疑槎犯斗，歸來兼恐海生桑。如今冷笑東方朔，唯用詼諧侍漢皇。',\n",
       " ' 往年鶯谷接清塵，今日鼇山作侍臣。二紀計偕勞筆研，一朝宣入掌絲綸。聲名烜赫文章士，金紫雍容富貴身。絳帳恩深無路報，語餘相顧却酸辛。',\n",
       " ' 正憐香雪披千片，忽訝殘霞覆一叢。還似妖姬長年後，酒酣雙臉却微紅。',\n",
       " ' 星斗疎明禁漏殘，紫泥封後獨凭闌。露和玉屑金盤冷，月射珠光貝闕寒。天襯樓臺籠苑外，風吹歌管下雲端。長卿秪爲長門賦，未識君臣際會難。',\n",
       " ' 蠭黃蝶粉兩依依，狎宴臨春日正遲。密旨不教江令醉，麗華微笑認皇慈。',\n",
       " ' 玉銜花馬蹋香街，詔遣追歡綺席開。中使押從天上去外人知自日邊來。臣心淨比漪漣水，聖澤深於瀲灩杯。纔有異恩頒稷契，已將優禮及鄒枚。清商適向棃園降，妙妓新行峽雨迴。不敢通宵離禁直，晚乘殘醉入銀臺。',\n",
       " ' 莫道秋來芳意違，宮娃猶似妒蛾眉。幸當玉輦經過處，不怕金風浩蕩時。草色長承垂地葉，日華先動映樓枝。澗松亦有凌雲分，爭似移根太液池。',\n",
       " ' 上苑離宮處處迷，相風高與露盤齊。金階鑄出狻猊立，玉樹雕成狒𤝞啼。外使調鷹初得按，中官過馬不教嘶。笙歌錦繡雲霄裏，獨許詞臣醉似泥。',\n",
       " ' 獵犬諳斜路，宮嬪識認旗。馬前雙兔起，宣爾羽林兒。',\n",
       " ' 小鐙狹鞦鞘，鞍輕妓細腰。有時齊走馬，也學唱交交。',\n",
       " ' 蹀躞巴陵駿，毰毸碧野雞。忽聞仙樂動，賜酒玉偏提。',\n",
       " ' 曳裾談笑殿西頭，忽聽征鐃從冕旒。鳳蓋行時移紫氣，鸞旗駐處認皇州。曉題御服頒羣吏，夜發宮嬪詔列侯。雨露涵濡三百載，不知誰擬殺身酬。',\n",
       " ' 中宵忽見動葭灰，料得南枝有早梅。四野便應枯草綠，九重先覺凍雲開。陰冰莫向河源塞，陽氣今從地底迴。不道慘舒無定分，却憂蚊響又成雷。',\n",
       " ' 垂老何時見弟兄，背燈愁泣到天明。不知短髮能多少，一滴秋霖白一莖。',\n",
       " ' 未許鶯偷出漢宮，上林初進半金籠。蔗漿自透銀杯冷，朱實相輝玉椀紅。俱有亂離終日恨，貴將滋味片時同。霜威食檗應難近，宜在紗窗繡戶中。',\n",
       " ' 謫宦過東畿，所抵州名濮。故里欲清明，臨風堪慟哭。溪長柳似帷，山暖花如醭。逆旅訝簪裾，野老悲陵谷。暝鳥影連翩，驚狐尾纛簌。尚得佐方州，信是皇恩沐。',\n",
       " ' 策蹇相尋犯雪泥，廚煙未動日平西。門庭野水䙰褷鷺，鄰里短牆咿喔雞。未入慶霄君擇肉，畏逢華轂我吹韲。地爐貰酒成狂醉，更覺襟懷得喪齊。',\n",
       " ' 箇儂居處近誅茅，枳棘籬兼用荻梢。盡日風扉從自掩，無人筒釣是誰拋。城方四面牆陰直，江闊中心水脈坳。我亦好閑求老伴，莫嫌遷客且論交。',\n",
       " ' 春陰漠漠土脈潤，春寒微微風意和。閑嗤入甲奔競態，醉唱落調漁樵歌。詩道揣量疑可進，宦情刓缺轉無多。酒酣狂興依然在，其奈千莖鬢雪何。',\n",
       " ' 敏手何妨誤汰金，敢懷私忿斅羊斟。直應宣室還三接，未必豐城便陸沈。熾炭一爐真玉性，濃霜千澗老松心。私恩尚有捐驅誓，況是君恩萬倍深。',\n",
       " ' 征途安敢更遷延，冒入重圍勢使然。衆果却應存苦李，五缾惟恐竭甘泉。多端莫撼三珠樹，密策尋遺七寶鞭。黃篾舫中梅雨裏，野人無事日高眠。',\n",
       " ' 道方時險擬如何，謫去甘心隱薜蘿。青草湖將天暗合，白頭浪與雪相和。旗亭臘酎踰年熟，水國春寒向晚多。處困不忙仍不怨，醉來唯是欲傞傞。',\n",
       " ' 索寞襟懷酒半醒，無人一爲解餘酲。岸頭柳色春將盡，船背雨聲天欲明。去國正悲同旅雁，隔江何忍更啼鶯。蓮花幕下風流客，試與溫存譴逐情。',\n",
       " ' 兩兩珍禽渺渺溪，翠衿紅掌淨無泥。向陽眠處莎成毯，蹋水飛時浪作梯。依倚雕梁輕社燕，抑揚金距笑晨雞。勸君細認漁翁意，莫遣絚羅誤穩棲。',\n",
       " ' 北陸候纔變，南枝花已開。無人同悵望，把酒獨裴回。凍白雪爲伴，寒香風是媒。何因逢越使，腸斷謫仙才。',\n",
       " ' 欲明籬被風吹倒，過午門因客到開。忍苦可能遭鬼笑，息機應免致鷗猜。岳僧互乞新詩去，酒保頻徵舊債來。唯有狂吟與沈飲，時時猶自觸靈臺。',\n",
       " ' 梅花不肯傍春光，自向深冬著豔陽。龍笛遠吹胡地月，燕釵初試漢宮妝。風雖強暴翻添思，雪欲侵凌更助香。應笑暫時桃李樹，盜天和氣作年芳。',\n",
       " ' 借得茅齋岳麓西，擬將身世老鋤犂。清晨向市煙含郭，寒夜歸村月照溪。爐爲窗明僧偶坐，松因雪折鳥驚啼。靈椿朝菌由來事，却笑莊生始欲齊。',\n",
       " ' 古木侵天日已沈，露華涼冷潤衣襟。江城曛黑人行絕，唯有啼鳥伴夜碪。',\n",
       " ' 天際霞光入水中，水中天際一時紅。直須日觀三更後，首送金烏上碧空。',\n",
       " ' 萬里清江萬里天，一村桑柘一村煙。漁翁醉著無人喚，過午醒來雪滿船。',\n",
       " ' 一籠金線拂彎橋，幾被兒童損細腰。無奈靈和標格在，春來依舊褭長條。',\n",
       " ' 抽毫連夜侍明光，執靮三年從省方。燒玉謾勞曾歷試，鑠金寧爲欠周防。也知恩澤招讒口，還痛神祇誤直腸。聞道復官飜涕泗，屬車何在水茫茫。',\n",
       " ' 又挂朝衣一自驚，始知天意重推誠。青雲有路通還去，白髮無私健亦生。曾避暖池將浴鳳，却同寒谷乍遷鶯。宦途巇嶮終難測，穩泊漁舟隱姓名。',\n",
       " ' 萬樹綠楊垂，千般黃鳥語。庭花風雨餘，岑寂如村塢。依依官渡頭，晴陽照行旅。',\n",
       " ' 四序風光總是愁，鬢毛衰颯涕橫流。此書未到心先到，想在孤城海岸頭。',\n",
       " ' 湘浦梅花兩度開，直應天意別栽培。玉爲通體依稀見，香號返魂容易迴。寒氣與君霜裏退，陽和爲爾臘前來。夭桃莫倚東風勢，調鼎何曾用不材。',\n",
       " ' 萬古離懷憎物色，幾生愁緒溺風光。廢城沃土肥春草，野渡空船蕩夕陽。倚道向人多脈脈，爲情因酒易倀倀。宦途棄擲須甘分，迴避紅塵是所長。',\n",
       " ' 動非求進靜非禪，咋舌吞聲過十年。溪漲浪花如積石，雨晴雲葉似連錢。干戈歲久諳戎事，枕簟秋涼減夜眠。攻苦慣來無不可，寸心如水但澄鮮。',\n",
       " ' 一園紅豔醉坡陀，自地連梢簇蒨羅。蜀魄未歸長滴血，秪應偏滴此叢多。',\n",
       " ' 橋下淺深水，竹間紅白花。酒仙同避世，何用厭長沙。',\n",
       " ' 西山爽氣生襟袖，南浦離愁入夢魂。人泊孤舟青草岸，鳥鳴高樹夕陽村。偷生亦似符天意，未死深疑負國恩。白面兒郎猶巧宦，不知誰與正乾坤。',\n",
       " ' 漸覺人心望息兵，老儒希覬見澄清。正當困辱殊輕死，已過艱危却戀生。多難始應彰勁節，至公安肯爲虛名。暫時胯下何須恥，自有蒼蒼鑒赤誠。',\n",
       " ' 天長水遠網羅稀，保得重重翠碧衣。挾彈小兒多害物，勸君莫近市朝飛。',\n",
       " ' 齒如冰雪髮如黳，幾百年來醉似泥。不共世人爭得失，臥牀前有上天梯。',\n",
       " ...]"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_path = \"../../H/datasets/chinese_potery/\"\n",
    "category = \"poet.tang\"\n",
    "author = None\n",
    "constrain = None\n",
    "\n",
    "data = parse_raw_data(data_path, category, author, constrain)\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-26T15:00:48.333887Z",
     "start_time": "2020-04-26T15:00:48.324556Z"
    }
   },
   "outputs": [],
   "source": [
    "def pad_sequences(sequences,\n",
    "                  maxlen=None,\n",
    "                  dtype='int32',\n",
    "                  padding='pre',\n",
    "                  truncating='pre',\n",
    "                  value=0.):\n",
    "    if not hasattr(sequences, '__len__'):\n",
    "        raise ValueError(\"sequences must be iterable\")\n",
    "    lengths = []\n",
    "    for x in sequences:\n",
    "        if not hasattr(x, '__len__'):\n",
    "            raise ValueError(\n",
    "                'sequences must be a list of iterables. Found non-iterable: ' +\n",
    "                str(x))\n",
    "        lengths.append(len(x))\n",
    "\n",
    "    num_samples = len(sequences)\n",
    "    if maxlen is None:\n",
    "        maxlen = max(lengths)\n",
    "\n",
    "    sample_shape = tuple()\n",
    "    for s in sequences:\n",
    "        if len(s) > 0:\n",
    "            sample_shape = np.asarray(s).shape[1:]\n",
    "            break\n",
    "\n",
    "    x = (np.ones((num_samples, maxlen) + sample_shape) * value).astype(dtype)\n",
    "    for idx, s in enumerate(sequences):\n",
    "        if not len(s):\n",
    "            continue\n",
    "        if truncating == 'pre':\n",
    "            trunc = s[-maxlen:]\n",
    "        elif truncating == 'post':\n",
    "            trunc = s[:maxlen]\n",
    "        else:\n",
    "            raise ValueError('Truncating type \"%s\" not understood' %\n",
    "                             truncating)\n",
    "\n",
    "        trunc = np.asarray(trunc, dtype=dtype)\n",
    "        if trunc.shape[1:] != sample_shape:\n",
    "            raise ValueError(\n",
    "                \"shape of sample %s of sequence at position %s is different from expected shape %s\"\n",
    "                % (trunc.shape[1:], idx, sample_shape))\n",
    "\n",
    "        if padding == 'post':\n",
    "            x[idx, :len(trunc)] = trunc\n",
    "        elif padding == 'pre':\n",
    "            x[idx, -len(trunc):] = trunc\n",
    "        else:\n",
    "            raise ValueError(\"padding type %s not understood\" % padding)\n",
    "    return x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_data(config):\n",
    "    data = parse_raw_data(config.data_path, config.category, config.authot,\n",
    "                          config.constrain)\n",
    "\n",
    "    chars = {c for line in data for c in line}\n",
    "    char_to_ix = {char: ix for ix, char in enumerate(chars)}\n",
    "    char_to_ix['<EOP>'] = len(char_to_ix)\n",
    "    char_to_ix['<START>'] = len(char_to_ix)\n",
    "    char_to_ix['</s>'] = len(char_to_ix)\n",
    "    ix_to_chars = {ix: char for char, ix in list(char_to_ix.items())}\n",
    "\n",
    "    for i in range(0, len(data)):\n",
    "        data[i] = ['<START>'] + list(data[i]) + ['<EOP>']\n",
    "\n",
    "    data_id = [[char_to_ix[w] for w in line] for line in data]\n",
    "\n",
    "    pad_data = pad_sequences(data_id,\n",
    "                             maxlen=config.poetry_maxlen,\n",
    "                             padding='pre',\n",
    "                             truncating='post',\n",
    "                             value=len(char_to_ix) - 1)\n",
    "    np.savez_compressed(config.processed_data_path,\n",
    "                        data=pad_data,\n",
    "                        word2ix=char2ix,\n",
    "                        ix2word=ix_to_chars)\n",
    "    return pad_data, char_to_ix, ix_to_chars"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "class Config(object):\n",
    "    data_path = \"../../H/datasets/chinese_potery/\"\n",
    "    category = \"poet.tang\"\n",
    "    author = None\n",
    "    constrain = None\n",
    "    poetry_max_len = 125\n",
    "    sample_max_len = poetry_max_len - 1\n",
    "    processed_data_path = \"data/tang.npz\"\n",
    "    word_dict_path = 'wordDic'\n",
    "    \n",
    "    model_path = 'model/tang_200.pth'\n",
    "    model_prefix = 'model/tang'\n",
    "\n",
    "    batch_size = 128\n",
    "    epoch_num = 201\n",
    "\n",
    "    embedding_dim = 256\n",
    "    hidden_dim = 256\n",
    "    layer_num = 2  # rnn的层数\n",
    "    lr = 0.01\n",
    "    weight_decay = 1e-4\n",
    "\n",
    "    plot_every = 2\n",
    "    debug_file = '/tmp/debugp'\n",
    "    env = 'poetry'\n",
    "\n",
    "    use_gpu = False\n",
    "\n",
    "    max_gen_len = 200  # 生成诗歌最长长度\n",
    "    sentence_max_len = 4  # 生成诗歌的最长句子\n",
    "\n",
    "    prefix_words = '细雨鱼儿出,微风燕子斜。'  # 不是诗歌的组成部分，用来控制生成诗歌的意境\n",
    "    start_words = '闲云潭影日悠悠'  # 诗歌开始\n",
    "    acrostic = False  # 是否是藏头诗"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "config = Config()\n",
    "pad_data, char_to_ix, ix_to_char = get_data(config)\n",
    "\n",
    "for l in pad_data[:10]:\n",
    "    print(l)\n",
    "class Config(object):\n",
    "    data_path = \"./json/\"\n",
    "    category = \"poet.tang\"\n",
    "    author = None\n",
    "    constrain = None\n",
    "    poetry_max_len = 125\n",
    "    sample_max_len = poetry_max_len-1\n",
    "    processed_data_path = \"data/tang.npz\"\n",
    "    word_dict_path = 'wordDic'\n",
    "    model_path = 'model/tang_200.pth'\n",
    "    model_prefix = 'model/tang'\n",
    "\n",
    "    batch_size = 128\n",
    "    epoch_num = 201\n",
    "\n",
    "    embedding_dim = 256\n",
    "    hidden_dim = 256\n",
    "    layer_num = 2  # rnn的层数\n",
    "    lr = 0.01\n",
    "    weight_decay = 1e-4\n",
    "\n",
    "    plot_every = 2\n",
    "    debug_file = '/tmp/debugp'\n",
    "    env = 'poetry'\n",
    "\n",
    "    use_gpu = False\n",
    "\n",
    "    max_gen_len = 200  # 生成诗歌最长长度\n",
    "    sentence_max_len = 4 # 生成诗歌的最长句子\n",
    "\n",
    "    prefix_words = '细雨鱼儿出,微风燕子斜。'  # 不是诗歌的组成部分，用来控制生成诗歌的意境\n",
    "    start_words = '闲云潭影日悠悠'  # 诗歌开始\n",
    "    acrostic = False  # 是否是藏头诗"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "config = Config()\n",
    "pad_data, char_to_ix, ix_to_chars = get_data(config)\n",
    "for l in pad_data[:10]:\n",
    "    print(l)\n",
    "\n",
    "n = 0\n",
    "for k, v in char_to_ix.items():\n",
    "    print(k, v)\n",
    "    if n > 10:\n",
    "        break\n",
    "    n += 1\n",
    "\n",
    "n = 0\n",
    "for k, v in ix_to_chars.items():\n",
    "    print(k, v)\n",
    "    if n > 10:\n",
    "        break\n",
    "    n += 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 创建模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-26T08:17:50.499769Z",
     "start_time": "2020-04-26T08:17:50.050654Z"
    }
   },
   "outputs": [],
   "source": [
    "import torch\n",
    "import torch.nn as nn\n",
    "import torch.nn.functional as F\n",
    "from torch.autograd import Variable"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-26T08:36:29.292410Z",
     "start_time": "2020-04-26T08:36:29.284828Z"
    }
   },
   "outputs": [],
   "source": [
    "class LM(nn.Module):\n",
    "    def __init__(vocab_size, embedding_dim, hidden_size, num_layers, device):\n",
    "        \"\"\"\n",
    "        embedding --> lstm(dropout) --> linear(dropout) --> relu\n",
    "        \"\"\"\n",
    "        super(LM, self).__init__()\n",
    "        self.embedding = nn.Embedding(vocab_size, embedding_dim)\n",
    "        self.lstm = nn.LSTM(\n",
    "            embedding_dim,\n",
    "            hidden_size,\n",
    "            num_layers=num_layers,\n",
    "            batch_first=False,  # batch维度默认位于第二位，需要手动指定\n",
    "        )\n",
    "        self.linear = nn.Linear(hidden_size, vocab_size)\n",
    "        self.dropout = nn.Dropout(0.2)  \n",
    "        self.device = device\n",
    "\n",
    "    def forward(self, inputs, hidden):\n",
    "        seq_len, batch_size = inputs.size()  # batch维度不位于第一位\n",
    "\n",
    "        embeds = self.embedding(inputs)  # seq,batch,embed_dim\n",
    "\n",
    "        output, hidden = self.lstm(embeds, hidden)  # output:seq,batch,hidden\n",
    "        output = output.view(seq_len * batch_size, -1)  # seq*batch,hidden\n",
    "        \n",
    "        output = self.dropout(output) # 线性层之前使用 dropout\n",
    "\n",
    "        output = F.relu(self.linear(output))  # seq*batch,vocab_size\n",
    "        return output, hidden\n",
    "\n",
    "    def init_hidden(self, num_layers, batch_size):\n",
    "        return (Variable(torch.zeros(num_layers, batch_size,\n",
    "                                     self.hidden_size)),\n",
    "                Variable(torch.zeros(num_layers, batch_size,\n",
    "                                     self.hidden_size)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 训练模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-04-26T15:31:41.560421Z",
     "start_time": "2020-04-26T15:31:41.549825Z"
    }
   },
   "outputs": [],
   "source": [
    "class TrainModel:\n",
    "    def __init__(self):\n",
    "        os.environ['CUDA_VISIBLE_DEVICES'] = '0'\n",
    "        self.config = Config()\n",
    "        self.device = torch.device(\n",
    "            'cuda') if self.config.use_gpu else torch.device('cpu')\n",
    "\n",
    "    def train(self, data_loader, model, optimizer, criterion, char_to_ix,\n",
    "              ix_to_chars):\n",
    "        for epoch in range(self.config.num_epoches):\n",
    "            for step, x in enumerate(data_loader):\n",
    "                x = x.long().transpose(1, 0).contiguous()\n",
    "                x = x.to(self.device)\n",
    "                optimizer.zero_grad()\n",
    "                input_, target = x[:-1, :], x[1:, :]\n",
    "                target = target.view(-1)\n",
    "\n",
    "                hidden = model.initial_hidden(self.config.num_layers,\n",
    "                                              x.size()[1])\n",
    "\n",
    "                output, _ = model(input_, hidden)\n",
    "                loss = criterion(output, target)\n",
    "\n",
    "                loss.backward()\n",
    "\n",
    "                optimizer.step()\n",
    "\n",
    "                if step % 200 == 0:\n",
    "                    print(\"epoch: %d, loss: %f\" % (epoch, loss.data))\n",
    "\n",
    "            if epoch % 1 == 0:\n",
    "                torch.save(model.state_dict(),\n",
    "                           \"%s_%s.pth\" % (self.config.model_prefix, epoch))\n",
    "\n",
    "                word = '床前明月光'\n",
    "                gen_poetry = ''.join(\n",
    "                    self.generate_head_test(model, word, char_to_ix,\n",
    "                                            ix_to_chars))\n",
    "                print(gen_poetry)\n",
    "\n",
    "    def run(self):\n",
    "        data, char_to_ix, ix_to_chars = get_data(self.config)\n",
    "        vocab_size = len(char_to_ix)\n",
    "        print(\"样本数：%d\" % len(data))\n",
    "        print(\"字典大小：%d\" % vocab_size)\n",
    "\n",
    "        data = torch.from_numpy(data)\n",
    "        data_loader = Data.DataLoader(data,\n",
    "                                      batch_size=self.config.batch_size,\n",
    "                                      shuffle=True,\n",
    "                                      num_works=1)\n",
    "\n",
    "        model = LM(vocab_size=vocab_size,\n",
    "                   embedding_dim=self.config.embedding_dim,\n",
    "                   hidden_size=self.config.hidden_size,\n",
    "                   num_layers=self.config.num_layers,\n",
    "                   device=self.device)\n",
    "        model.to(self.device)\n",
    "\n",
    "        optimizer = nn.optim.Adam(model.parameters(),\n",
    "                                  lr=self.config.lr,\n",
    "                                  weight_decay=self.config.weight_decay)\n",
    "        criterion = nn.CrossEntropyLoss()\n",
    "\n",
    "        self.train(data_loader, model, optimizer, criterion, char_to_ix,\n",
    "                   ix_to_chars)\n",
    "\n",
    "    def generate_head(self, model, head_sentence, word_to_ix, ix_to_word):\n",
    "        poetry = []\n",
    "        head_char_len = len(head_sentence)\n",
    "        sentence_len = 0\n",
    "        pre_char = '<START>'\n",
    "\n",
    "        input_ = (torch.Tensor([word_to_ix['START']\n",
    "                                ]).view(1, 1).long()).to(self.device)\n",
    "        hidden = model.init_hidden(self.config.layer_num, 1)\n",
    "\n",
    "        top_index = output.data[0].topk(1)[1][0].item()\n",
    "        char = ix_to_word[top_index]\n",
    "\n",
    "        for i in range(self.config.max_gen_len):\n",
    "            # 前向计算出概率最大的当前词\n",
    "            output, hidden = model(input, hidden)\n",
    "            top_index = output.data[0].topk(1)[1][0].item()\n",
    "            char = ix_to_word[top_index]\n",
    "\n",
    "            # 句首的字用藏头字代替\n",
    "            if pre_char in ['。', '！', '<START>']:\n",
    "                if sentence_len == head_char_len:\n",
    "                    break\n",
    "                else:\n",
    "                    char = head_sentence[sentence_len]\n",
    "                    sentence_len += 1\n",
    "                    input = (input.data.new([word_to_ix[char]])).view(1, 1)\n",
    "            else:\n",
    "                input = (input.data.new([top_index])).view(1, 1)\n",
    "\n",
    "            poetry.append(char)\n",
    "            pre_char = char\n",
    "\n",
    "        return poetry\n",
    "    \n",
    "model = TrainModel()\n",
    "model.run()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 利用模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "class Sample(object):\n",
    "    def __init__(self):\n",
    "        self.config = Config()\n",
    "        self.device = torch.device(\n",
    "            'cuda') if self.config.use_gpu else torch.device('cpu')\n",
    "\n",
    "        self.processed_data_path = self.config.processed_data_path\n",
    "        self.model_path = self.config.model_path\n",
    "        self.max_len = self.config.max_gen_len\n",
    "        self.sentence_max_len = self.config.sentence_max_len\n",
    "\n",
    "        self.load_data()\n",
    "        self.load_model()\n",
    "\n",
    "    def load_data(self):\n",
    "        if os.path.exists(self.processed_data_path):\n",
    "            data = np.load(self.processed_data_path)\n",
    "            self.data, self.word_to_ix, self.ix_to_word = data['data'], data[\n",
    "                'word2ix'].item(), data['ix2word'].item()\n",
    "\n",
    "    def load_model(self):\n",
    "        model = PoetryModel(len(self.word_to_ix), self.config.embedding_dim,\n",
    "                            self.config.hidden_dim, self.device,\n",
    "                            self.config.layer_num)\n",
    "        map_location = lambda s, l: s\n",
    "        state_dict = torch.load(self.config.model_path,\n",
    "                                map_location=map_location)\n",
    "        model.load_state_dict(state_dict)\n",
    "        model.to(self.device)\n",
    "        self.model = model\n",
    "\n",
    "    def generate_random(self, start_words='<START>'):\n",
    "        \"\"\"自由生成一首诗歌\"\"\"\n",
    "        poetry = []\n",
    "        sentence_len = 0\n",
    "\n",
    "        input = (torch.Tensor([self.word_to_ix[start_words]\n",
    "                               ]).view(1, 1).long()).to(self.device)\n",
    "        hidden = self.model.init_hidden(self.config.layer_num, 1)\n",
    "\n",
    "        for i in range(self.max_len):\n",
    "            # 前向计算出概率最大的当前词\n",
    "            output, hidden = self.model(input, hidden)\n",
    "            top_index = output.data[0].topk(1)[1][0].item()\n",
    "            char = self.ix_to_word[top_index]\n",
    "\n",
    "            # 遇到终结符则输出\n",
    "            if char == '<EOP>':\n",
    "                break\n",
    "\n",
    "            # 有8个句子则停止预测\n",
    "            if char in ['。', '！']:\n",
    "                sentence_len += 1\n",
    "                if sentence_len == 8:\n",
    "                    poetry.append(char)\n",
    "                    break\n",
    "\n",
    "            input = (input.data.new([top_index])).view(1, 1)\n",
    "            poetry.append(char)\n",
    "\n",
    "        return poetry\n",
    "\n",
    "    def generate_head(self, head_sentence):\n",
    "        \"\"\"生成藏头诗\"\"\"\n",
    "        poetry = []\n",
    "        head_char_len = len(head_sentence)  # 要生成的句子的数量\n",
    "        sentence_len = 0  # 当前句子的数量\n",
    "        pre_char = '<START>'  # 前一个已经生成的字\n",
    "\n",
    "        # 准备第一步要输入的数据\n",
    "        input = (torch.Tensor([self.word_to_ix['<START>']\n",
    "                               ]).view(1, 1).long()).to(self.device)\n",
    "        hidden = self.model.init_hidden(self.config.layer_num, 1)\n",
    "\n",
    "        for i in range(self.max_len):\n",
    "            # 前向计算出概率最大的当前词\n",
    "            output, hidden = self.model(input, hidden)\n",
    "            top_index = output.data[0].topk(1)[1][0].item()\n",
    "            char = self.ix_to_word[top_index]\n",
    "\n",
    "            # 句首的字用藏头字代替\n",
    "            if pre_char in ['。', '！', '<START>']:\n",
    "                if sentence_len == head_char_len:\n",
    "                    break\n",
    "                else:\n",
    "                    char = head_sentence[sentence_len]\n",
    "                    sentence_len += 1\n",
    "                    input = (input.data.new([self.word_to_ix[char]\n",
    "                                             ])).view(1, 1)\n",
    "            else:\n",
    "                input = (input.data.new([top_index])).view(1, 1)\n",
    "\n",
    "            poetry.append(char)\n",
    "            pre_char = char\n",
    "\n",
    "        return poetry\n",
    "\n",
    "    def generate_poetry(self, mode=1, head_sentence=None):\n",
    "        \"\"\"\n",
    "        模式一：随机生成诗歌\n",
    "        模式二：生成藏头诗\n",
    "        模式三：给定首句生成诗\n",
    "        :return:\n",
    "        \"\"\"\n",
    "        poetry = ''\n",
    "        if mode == 1 or (mode == 2 and head_sentence is None):\n",
    "            poetry = ''.join(self.generate_random())\n",
    "        if mode == 2 and head_sentence is not None:\n",
    "            head_sentence = head_sentence.replace(',', u'，').replace(\n",
    "                '.', u'。').replace('?', u'？')\n",
    "            poetry = ''.join(self.generate_head(head_sentence))\n",
    "\n",
    "        return poetry"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "165px"
   },
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
